diff options
| author | Joey Adams | 2011-01-17 19:17:29 +0000 |
|---|---|---|
| committer | Joey Adams | 2011-01-17 19:17:29 +0000 |
| commit | 59ad85e9165616e5de89b12465852ccf092f2e47 (patch) | |
| tree | 999456033e9cd9cd227a860d32fc052e90f1814a /json.c | |
| parent | 4869261b8a1ea6186b5d0c06d97c4296a2ce7bcf (diff) | |
Fixed UTF-16 surrogate pair calculation to properly handle cases like "\uD840\uDC00".
Diffstat (limited to 'json.c')
| -rw-r--r-- | json.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -824,7 +824,7 @@ json_decode_string(const char **sp, size_t *length, bool strict) s += 6; - uc = 0x10000 | ((uc & 0x3FF) << 10) | (lc & 0x3FF); + uc = 0x10000 + (((uc & 0x3FF) << 10) | (lc & 0x3FF)); } unicode_to_utf8(uc, (unsigned char *) buf); |
