| Index: fusl/src/locale/iconv.c
|
| diff --git a/fusl/src/locale/iconv.c b/fusl/src/locale/iconv.c
|
| index 1eeea94e0a38753691269b978f105b5e65ee33b8..00b6ce44ec92b83e1f26f3ea8836df4e07ac128e 100644
|
| --- a/fusl/src/locale/iconv.c
|
| +++ b/fusl/src/locale/iconv.c
|
| @@ -135,7 +135,7 @@ static void put_16(unsigned char *s, unsigned c, int e)
|
| static unsigned get_32(const unsigned char *s, int e)
|
| {
|
| e &= 3;
|
| - return s[e]+0U<<24 | s[e^1]<<16 | s[e^2]<<8 | s[e^3];
|
| + return ((unsigned)s[e])<<24 | s[e^1]<<16 | s[e^2]<<8 | s[e^3];
|
| }
|
|
|
| static void put_32(unsigned char *s, unsigned c, int e)
|
| @@ -366,7 +366,7 @@ size_t iconv(iconv_t cd0, char **restrict in, size_t *restrict inb, char **restr
|
| if (c < 128+type) break;
|
| c -= 128+type;
|
| c = legacy_chars[ map[c*5/4]>>2*c%8 |
|
| - map[c*5/4+1]<<8-2*c%8 & 1023 ];
|
| + map[c*5/4+1]<<(8-2*c%8) & 1023 ];
|
| if (!c) c = *(unsigned char *)*in;
|
| if (c==1) goto ilseq;
|
| }
|
| @@ -401,7 +401,7 @@ size_t iconv(iconv_t cd0, char **restrict in, size_t *restrict inb, char **restr
|
| d = c;
|
| for (c=0; c<128-totype; c++) {
|
| if (d == legacy_chars[ tomap[c*5/4]>>2*c%8 |
|
| - tomap[c*5/4+1]<<8-2*c%8 & 1023 ]) {
|
| + tomap[c*5/4+1]<<(8-2*c%8) & 1023 ]) {
|
| c += 128;
|
| goto revout;
|
| }
|
|
|