This commit is contained in:
Nicolas Williams committed 2015-06-18 00:03:46 -05:00
1 parent 164b877bfa
commit 6083581fea
2 files changed
+6 -2

No files matched your search

+4 -1
View File
@@ -717,7 +717,10 @@ jv jv_string_implode(jv j) {
for (i = 0; i < len; i++) {
jv n = jv_array_get(jv_copy(j), i);
assert(jv_get_kind(n) == JV_KIND_NUMBER);
s = jv_string_append_codepoint(s, jv_number_value(n));
int nv = jv_number_value(n);
if (nv > 0x10FFFF)
nv = 0xFFFD; // U+FFFD REPLACEMENT CHARACTER
s = jv_string_append_codepoint(s, nv);
}
jv_free(j);