From 595e046de3bf812c318e77ea8d003c543349fa54 Mon Sep 17 00:00:00 2001 From: LN Liberda Date: Fri, 29 May 2026 22:52:40 +0200 Subject: [PATCH] Zig 0.16: Skip the bytes already read as head in JSON import --- src/json_import.zig | 1 + 1 file changed, 1 insertion(+) diff --git a/src/json_import.zig b/src/json_import.zig index 11186b9..e26c716 100644 --- a/src/json_import.zig +++ b/src/json_import.zig @@ -532,6 +532,7 @@ pub fn import(fd: std.Io.File, head: []const u8) void { var rbuf: [1024]u8 = undefined; var p = Parser{.rd = fd.reader(main.io, &rbuf)}; + p.rd.seekBy(@intCast(head.len)) catch p.die("Failed seek"); defer if (p.zstd) |z| z.destroy(); if (head.len >= 4 and std.mem.eql(u8, head[0..4], "\x28\xb5\x2f\xfd")) {