]> granicus.if.org Git - php/commitdiff
MFB: Cast to unsigned char to prevent compiler warning
authorKalle Sommer Nielsen <kalle@php.net>
Tue, 19 May 2009 16:06:17 +0000 (16:06 +0000)
committerKalle Sommer Nielsen <kalle@php.net>
Tue, 19 May 2009 16:06:17 +0000 (16:06 +0000)
ext/json/JSON_parser.c

index 1b2e22b81ecceb1f298b9bc7c5de7594634adb7b..2342c3fb8811f03cc0ee97907ef3dedf1d8e068f 100644 (file)
@@ -360,7 +360,7 @@ static void utf16_to_utf8(smart_str *buf, unsigned short utf16)
                     | (utf16 & 0x3ff)) + 0x10000;
         buf->len -= 3;
 
-        smart_str_appendc(buf, 0xf0 | (utf32 >> 18));
+        smart_str_appendc(buf, (unsigned char) (0xf0 | (utf32 >> 18)));
         smart_str_appendc(buf, 0x80 | ((utf32 >> 12) & 0x3f));
         smart_str_appendc(buf, 0x80 | ((utf32 >> 6) & 0x3f));
         smart_str_appendc(buf, 0x80 | (utf32 & 0x3f));