Skip to content

Commit 3d25a9c

Browse files
committed
std.Io.Writer.Allocating.sendFile: use logicalPos
fixes ziglang#24754 tested with `zig build test-std -Dskip-release`
1 parent 6219c01 commit 3d25a9c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/std/Io/Writer.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2634,7 +2634,7 @@ pub const Allocating = struct {
26342634
const gpa = a.allocator;
26352635
var list = a.toArrayList();
26362636
defer setArrayList(a, list);
2637-
const pos = file_reader.pos;
2637+
const pos = file_reader.logicalPos();
26382638
const additional = if (file_reader.getSize()) |size| size - pos else |_| std.atomic.cache_line;
26392639
if (additional == 0) return error.EndOfStream;
26402640
list.ensureUnusedCapacity(gpa, limit.minInt64(additional)) catch return error.WriteFailed;

0 commit comments

Comments
 (0)