diff options
author | SHIBATA Hiroshi <hsbt@ruby-lang.org> | 2015-01-13 12:14:11 +0900 |
---|---|---|
committer | Florian Frank <flori@ping.de> | 2015-02-12 22:36:04 +0100 |
commit | fcf3a8b799955581c92055a4398d12ae0279338a (patch) | |
tree | 16161b8deb49816f450cb096587393abda1208ed /ext/json/ext/parser/parser.c | |
parent | 259dee6c9bdda08ed0c1fc2e69bfbb2d377faba0 (diff) | |
download | json-fcf3a8b799955581c92055a4398d12ae0279338a.tar.gz |
sync trunk again: fixed regression of r49027
Diffstat (limited to 'ext/json/ext/parser/parser.c')
-rw-r--r-- | ext/json/ext/parser/parser.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/json/ext/parser/parser.c b/ext/json/ext/parser/parser.c index 8824b30..20531b3 100644 --- a/ext/json/ext/parser/parser.c +++ b/ext/json/ext/parser/parser.c @@ -28,16 +28,16 @@ static UTF32 unescape_unicode(const unsigned char *p) UTF32 result = 0; b = digit_values[p[0]]; if (b < 0) return UNI_REPLACEMENT_CHAR; - result = (result << 4) | b; + result = (result << 4) | (unsigned char)b; b = digit_values[p[1]]; - result = (result << 4) | b; if (b < 0) return UNI_REPLACEMENT_CHAR; + result = (result << 4) | (unsigned char)b; b = digit_values[p[2]]; - result = (result << 4) | b; if (b < 0) return UNI_REPLACEMENT_CHAR; + result = (result << 4) | (unsigned char)b; b = digit_values[p[3]]; - result = (result << 4) | b; if (b < 0) return UNI_REPLACEMENT_CHAR; + result = (result << 4) | (unsigned char)b; return result; } |