commit 4d306ebd32f43363300188989a0bed99eb89c791 (tree)
parent 476cbe871aedf13a48be040dd04aa2fc5e59332a
Author: Andrew Kelley <andrew@ziglang.org>
Date: Wed, 11 Jan 2023 00:18:18 -0700
fix std.io.Reader regression
oops. #14264
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/std/io/reader.zig b/lib/std/io/reader.zig
@@ -30,7 +30,7 @@ pub fn Reader(
/// means the stream reached the end. Reaching the end of a stream is not an error
/// condition.
pub fn readAll(self: Self, buffer: []u8) Error!usize {
- return readAtLeast(self, buffer, 1);
+ return readAtLeast(self, buffer, buffer.len);
}
/// Returns the number of bytes read, calling the underlying read