mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-03-08 02:44:43 +01:00
std.Io.Writer: fix wrong return value from fixedDrain
This commit is contained in:
parent
a7808892f7
commit
6caa100f0d
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue