Ticket #57751: patch-src_3rdparty_webkit_Source_JavaScriptCore_runtime_JSONObject_cpp

File patch-src_3rdparty_webkit_Source_JavaScriptCore_runtime_JSONObject_cpp, 843 bytes (added by devernay (Frédéric Devernay), 5 years ago)
Line 
1--- src/3rdparty/webkit/Source/JavaScriptCore/runtime/JSONObject.cpp.orig       2019-07-06 01:58:44.000000000 +0200
2+++ src/3rdparty/webkit/Source/JavaScriptCore/runtime/JSONObject.cpp    2019-07-06 01:59:39.000000000 +0200
3@@ -335,7 +335,7 @@
4             default:
5                 static const char hexDigits[] = "0123456789abcdef";
6                 UChar ch = data[i];
7-                UChar hex[] = { '\\', 'u', hexDigits[(ch >> 12) & 0xF], hexDigits[(ch >> 8) & 0xF], hexDigits[(ch >> 4) & 0xF], hexDigits[ch & 0xF] };
8+                UChar hex[] = { '\\', 'u', static_cast<UChar>(hexDigits[(ch >> 12) & 0xF]), static_cast<UChar>(hexDigits[(ch >> 8) & 0xF]), static_cast<UChar>(hexDigits[(ch >> 4) & 0xF]), static_cast<UChar>(hexDigits[ch & 0xF]) };
9                 builder.append(hex, WTF_ARRAY_LENGTH(hex));
10                 break;
11         }