From f1872f495ad1e6abc695b78ee2cc3b1c0444cb8b Mon Sep 17 00:00:00 2001 From: Abdelrahman Farid Date: Tue, 19 Sep 2023 22:19:05 +0300 Subject: [PATCH] Fix bug with index increment in `unquote_string` --- core/encoding/json/parser.odin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/encoding/json/parser.odin b/core/encoding/json/parser.odin index d007e16d7..bc381efee 100644 --- a/core/encoding/json/parser.odin +++ b/core/encoding/json/parser.odin @@ -343,7 +343,7 @@ unquote_string :: proc(token: Token, spec: Specification, allocator := context.a i += 1 continue } - r, w := utf8.decode_rune_in_string(s) + r, w := utf8.decode_rune_in_string(s[i:]) if r == utf8.RUNE_ERROR && w == 1 { break }