1
0
mirror of https://github.com/stedolan/jq.git synced 2024-05-11 05:55:39 +00:00
This commit is contained in:
Nicolas Williams
2015-06-18 00:03:46 -05:00
parent 164b877bfa
commit 6083581fea
2 changed files with 6 additions and 2 deletions

View File

@@ -447,7 +447,8 @@ static pfunc found_string(struct jv_parser* p) {
codepoint = 0x10000 + (((codepoint - 0xD800) << 10)
|(surrogate - 0xDC00));
}
// FIXME assert valid codepoint
if (codepoint > 0x10FFFF)
codepoint = 0xFFFD; // U+FFFD REPLACEMENT CHARACTER
out += jvp_utf8_encode(codepoint, out);
break;