Browse Source

Fix bug with index increment in `unquote_string`

Abdelrahman Farid 2 years ago
parent
commit
f1872f495a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      core/encoding/json/parser.odin

+ 1 - 1
core/encoding/json/parser.odin

@@ -343,7 +343,7 @@ unquote_string :: proc(token: Token, spec: Specification, allocator := context.a
 			i += 1
 			i += 1
 			continue
 			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 {
 		if r == utf8.RUNE_ERROR && w == 1 {
 			break
 			break
 		}
 		}