mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
Fetch: fix FetchStream logic
This commit is contained in:
parent
8721efece4
commit
8da645c883
1 changed files with 2 additions and 2 deletions
|
|
@ -1114,8 +1114,8 @@ pub const Session = struct {
|
|||
}
|
||||
const buf = limit.slice(try w.writableSliceGreedy(1));
|
||||
const n = @min(buf.len, fs.remaining_len);
|
||||
@memcpy(buf[0..n], input.buffered()[0..n]);
|
||||
input.toss(n);
|
||||
try input.readSliceAll(buf[0..n]);
|
||||
w.advance(n);
|
||||
fs.remaining_len -= n;
|
||||
return n;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue