authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2024-05-31 03:25:22 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2024-05-31 03:25:22 -07:00
log7bed747a68aa7969649bb070c98042a699978b18
treed8d8f25927cda658c653984fd22e0826bee0e2b3
parent84fbe4db83738537df46119a31a806874f098240

fix crash appending codepoint to string

266/284 tests passed; 18 failed

1 files changed, 3 insertions(+), 1 deletions(-)

json.zig+3-1
......@@ -134,7 +134,9 @@ fn parseString(alloc: std.mem.Allocator, p: *Parser) anyerror!?StringIndex {
134134 break;
135135 }
136136 if (c != '\\') {
137 try characters.append(@intCast(c));
137 const l = std.unicode.utf8CodepointSequenceLength(c) catch unreachable;
138 const b = p.temp.items[p.idx - l ..][0..l];
139 try characters.appendSlice(b);
138140 continue;
139141 }
140142 switch (try p.shift()) {