aboutsummaryrefslogtreecommitdiff
path: root/lib/std
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2025-08-08 14:20:55 -0700
committerAndrew Kelley <andrew@ziglang.org>2025-08-08 14:21:57 -0700
commit3d25a9c1e07cfcb72250760b2c1a1d9d4f6174ed (patch)
tree588e1ee9d2017fc441098c4c0b2a07458505889f /lib/std
parent6219c015d8e8c958d96e5caa5ef0dbab9c414996 (diff)
downloadzig-3d25a9c1e07cfcb72250760b2c1a1d9d4f6174ed.tar.gz
zig-3d25a9c1e07cfcb72250760b2c1a1d9d4f6174ed.zip
std.Io.Writer.Allocating.sendFile: use logicalPos
fixes #24754 tested with `zig build test-std -Dskip-release`
Diffstat (limited to 'lib/std')
-rw-r--r--lib/std/Io/Writer.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/Io/Writer.zig b/lib/std/Io/Writer.zig
index 86614e6254..f27e42ab47 100644
--- a/lib/std/Io/Writer.zig
+++ b/lib/std/Io/Writer.zig
@@ -2634,7 +2634,7 @@ pub const Allocating = struct {
const gpa = a.allocator;
var list = a.toArrayList();
defer setArrayList(a, list);
- const pos = file_reader.pos;
+ const pos = file_reader.logicalPos();
const additional = if (file_reader.getSize()) |size| size - pos else |_| std.atomic.cache_line;
if (additional == 0) return error.EndOfStream;
list.ensureUnusedCapacity(gpa, limit.minInt64(additional)) catch return error.WriteFailed;