mirror of
https://code.blicky.net/yorhel/ncdu.git
synced 2026-11-03 21:49:42 -09:00
Zig 0.16: Skip the bytes already read as head in JSON import
This commit is contained in:
parent
fa2d9d062e
commit
595e046de3
1 changed files with 1 additions and 0 deletions
|
|
@ -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")) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue