Commit 4d306ebd32

Andrew Kelley <andrew@ziglang.org>
2023-01-11 08:18:18
fix std.io.Reader regression
oops. #14264
1 parent 476cbe8
Changed files (1)
lib
std
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