mirror of
https://github.com/ziglang/zig.git
synced 2026-02-17 14:59:14 +00:00
Fetch: fix FetchStream logic
This commit is contained in:
parent
8721efece4
commit
8da645c883
@ -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…
x
Reference in New Issue
Block a user