src/json.c

changeset 1668
3ffdfe1776b4
parent 1667
608cc0b25352
--- a/src/json.c	Thu Dec 25 11:10:13 2025 +0100
+++ b/src/json.c	Thu Dec 25 11:39:26 2025 +0100
@@ -175,7 +175,7 @@
     size_t token_part_start = json->buffer.pos;
 
     bool escape_end_of_string = ttype == CX_JSON_TOKEN_STRING
-        && json->uncompleted_content.ptr[json->uncompleted_content.length-1] == '\\';
+        && cx_strat(json->uncompleted_content, -1) == '\\';
 
     for (size_t i = json->buffer.pos; i < json->buffer.size; i++) {
         char c = json->buffer.space[i];

mercurial