eval/decode: Do not loose high surrogates followed by high surrogates

This commit is contained in:
ZyX
2016-03-07 08:59:03 +03:00
parent eb806c9620
commit 032ac502ff
2 changed files with 3 additions and 0 deletions

View File

@@ -499,6 +499,7 @@ json_decode_string_cycle_start:
hasnul = true;
}
if (SURROGATE_HI_START <= ch && ch <= SURROGATE_HI_END) {
PUT_FST_IN_PAIR(fst_in_pair, str_end);
fst_in_pair = (int) ch;
} else if (SURROGATE_LO_START <= ch && ch <= SURROGATE_LO_END
&& fst_in_pair != 0) {