about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/locale/iconv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/locale/iconv.c b/src/locale/iconv.c
index 4636307f..fd2f2e01 100644
--- a/src/locale/iconv.c
+++ b/src/locale/iconv.c
@@ -153,7 +153,7 @@ static void put_32(unsigned char *s, unsigned c, int e)
 
 static unsigned legacy_map(const unsigned char *map, unsigned c)
 {
-	unsigned x = c - 128 + map[-1];
+	unsigned x = c - 128 - map[-1];
 	x = legacy_chars[ map[x*5/4]>>2*x%8 |
 		map[x*5/4+1]<<8-2*x%8 & 1023 ];
 	return x ? x : c;