summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xs_json.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/xs_json.h b/xs_json.h
index 36a0665..c171172 100644
--- a/xs_json.h
+++ b/xs_json.h
@@ -260,9 +260,9 @@ static xs_val *_xs_json_loads_lexer(const char **json, js_type *t)
else
cp = i;
- /* replace dangerous control codes with the replacement char */
+ /* replace dangerous control codes with their visual representations */
if (cp >= '\0' && cp < ' ' && !strchr("\r\n\t", cp))
- cp = 0xfffd;
+ cp += 0x2400;
v = xs_utf8_enc(v, cp);
c = '\0';