src/json.c

changeset 1150
7b0bd5e76b5d
parent 1149
df5665de7344
child 1151
60113356a7de
equal deleted inserted replaced
1149:df5665de7344 1150:7b0bd5e76b5d
397 } else if (c == 'f') { 397 } else if (c == 'f') {
398 c = '\f'; 398 c = '\f';
399 } else if (c == 'b') { 399 } else if (c == 'b') {
400 c = '\b'; 400 c = '\b';
401 } else if (c == 'u') { 401 } else if (c == 'u') {
402 if (i+4 < str.length) { 402 if (i+4 < str.length - 1) {
403 cxstring codepoint_str = { str.ptr + i + 1, 4}; 403 cxstring codepoint_str = { str.ptr + i + 1, 4};
404 uint32_t codepoint; 404 uint32_t codepoint;
405 if(!cx_strtou32_lc_(codepoint_str, &codepoint, 16, "")) { 405 if(!cx_strtou32_lc_(codepoint_str, &codepoint, 16, "")) {
406 char utf8buf[4]; 406 char utf8buf[4];
407 int utf8len = codepoint_to_utf8(codepoint, utf8buf); 407 int utf8len = codepoint_to_utf8(codepoint, utf8buf);

mercurial