X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f5fb6871865e08929a113dc23f8741023fdcae72..9386cb75e34acb49cd9fac945e09cf002f22db2d:/src/common/strconv.cpp diff --git a/src/common/strconv.cpp b/src/common/strconv.cpp index 56e2894bd3..50571277e7 100644 --- a/src/common/strconv.cpp +++ b/src/common/strconv.cpp @@ -436,7 +436,7 @@ size_t wxMBConvUTF7::MB2WC(wchar_t *buf, const char *psz, size_t n) const d += cc; for (l += 6; l >= 8; lsb = !lsb) { - c = (d >> (l -= 8)) % 256; + c = (unsigned char)((d >> (l -= 8)) % 256); if (lsb) { if (buf) @@ -445,7 +445,7 @@ size_t wxMBConvUTF7::MB2WC(wchar_t *buf, const char *psz, size_t n) const } else if (buf) - *buf = c << 8; + *buf = (wchar_t)(c << 8); } } if (*psz == '-') @@ -510,7 +510,7 @@ size_t wxMBConvUTF7::WC2MB(char *buf, const wchar_t len++; } #ifndef WC_UTF16 - else if (((wxUint16)cc) > 0xffff) + else if (((wxUint32)cc) > 0xffff) { // no surrogate pair generation (yet?) return (size_t)-1;