diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2025-03-22 18:00:25 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2025-03-22 18:00:25 +0100 |
commit | 0737819efdd0bae112d16d874cac7e747e43cd08 (patch) | |
tree | 98a9ac84f7f347ae530c14852c68870682f3d04c /lib/iconv.c | |
parent | 163a663518f33bab48b28431972e580b366b4d49 (diff) | |
parent | e670957a8693f860cf7d77fed4ce6b4b056a8083 (diff) |
Merge branch 'release/debian/1.3-1'debian/1.3-1
Diffstat (limited to 'lib/iconv.c')
-rw-r--r-- | lib/iconv.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/iconv.c b/lib/iconv.c index 310f4043..f7a67798 100644 --- a/lib/iconv.c +++ b/lib/iconv.c @@ -195,7 +195,10 @@ utf32be_mbtowc (ucs4_t *pwc, const unsigned char *s, size_t n) { if (n >= 4) { - ucs4_t wc = (s[0] << 24) + (s[1] << 16) + (s[2] << 8) + s[3]; + ucs4_t wc = ((ucs4_t) s[0] << 24) + + ((ucs4_t) s[1] << 16) + + ((ucs4_t) s[2] << 8) + + (ucs4_t) s[3]; if (wc < 0x110000 && !(wc >= 0xd800 && wc < 0xe000)) { *pwc = wc; @@ -237,7 +240,10 @@ utf32le_mbtowc (ucs4_t *pwc, const unsigned char *s, size_t n) { if (n >= 4) { - ucs4_t wc = s[0] + (s[1] << 8) + (s[2] << 16) + (s[3] << 24); + ucs4_t wc = (ucs4_t) s[0] + + ((ucs4_t) s[1] << 8) + + ((ucs4_t) s[2] << 16) + + ((ucs4_t) s[3] << 24); if (wc < 0x110000 && !(wc >= 0xd800 && wc < 0xe000)) { *pwc = wc; |