aboutsummaryrefslogtreecommitdiff
path: root/xs_json.h
diff options
context:
space:
mode:
Diffstat (limited to 'xs_json.h')
-rw-r--r--xs_json.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/xs_json.h b/xs_json.h
index 6f42eab..b503ed8 100644
--- a/xs_json.h
+++ b/xs_json.h
@@ -281,7 +281,7 @@ static xs_val *_xs_json_load_lexer(FILE *f, js_type *t)
}
/* replace dangerous control codes with their visual representations */
- if (cp < ' ' && !strchr("\r\n\t", cp))
+ if (cp == 0 || (cp < ' ' && !strchr("\r\n\t", cp)))
cp += 0x2400;
break;