src/json.c

changeset 1150
7b0bd5e76b5d
parent 1149
df5665de7344
child 1151
60113356a7de
--- a/src/json.c	Sat Jan 25 16:13:28 2025 +0100
+++ b/src/json.c	Sat Jan 25 16:27:32 2025 +0100
@@ -399,7 +399,7 @@
             } else if (c == 'b') {
                 c = '\b';
             } else if (c == 'u') {
-                if (i+4 < str.length) {
+                if (i+4 < str.length - 1) {
                     cxstring codepoint_str = { str.ptr + i + 1, 4};
                     uint32_t codepoint;
                     if(!cx_strtou32_lc_(codepoint_str, &codepoint, 16, "")) {

mercurial