mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
std.Io.Writer: fix wrong return value from fixedDrain
This commit is contained in:
parent
a7808892f7
commit
6caa100f0d
@ -2266,7 +2266,7 @@ pub fn fixedDrain(w: *Writer, data: []const []const u8, splat: usize) Error!usiz
|
||||
const pattern = data[data.len - 1];
|
||||
const dest = w.buffer[w.end..];
|
||||
switch (pattern.len) {
|
||||
0 => return w.end,
|
||||
0 => return 0,
|
||||
1 => {
|
||||
assert(splat >= dest.len);
|
||||
@memset(dest, pattern[0]);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user