# HG changeset patch # User Mike Becker # Date 1737897321 -3600 # Node ID 48279dbe4811624b35ecff54237b044a40b63457 # Parent fa2811e9ab193d0c992a2a06ba9b9404a12d986b fix wrong inequality diff -r fa2811e9ab19 -r 48279dbe4811 src/json.c --- a/src/json.c Sun Jan 26 14:13:48 2025 +0100 +++ b/src/json.c Sun Jan 26 14:15:21 2025 +0100 @@ -404,7 +404,7 @@ } else if (utf16a >= 0xD800 && utf16a <= 0xDBFF) { // character is encoded as a surrogate pair // get next 6 bytes - if (str.length > 12) { + if (str.length >= 12) { if (*(str.ptr+6) == '\\' && *(str.ptr+7) == 'u') { cxstring ustr2 = { str.ptr+8, 4 }; if (!cx_strtou16_lc(ustr2, &utf16b, 16, "")