mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-03-08 02:24:33 +01:00
Fix memcpy alias bug in std.compress.lzma
This commit is contained in:
parent
0595feb341
commit
d50bae4da9
1 changed files with 1 additions and 1 deletions
|
|
@ -77,7 +77,7 @@ pub fn Decompress(comptime ReaderType: type) type {
|
|||
const input = self.to_read.items;
|
||||
const n = @min(input.len, output.len);
|
||||
@memcpy(output[0..n], input[0..n]);
|
||||
@memcpy(input[0 .. input.len - n], input[n..]);
|
||||
std.mem.copyForwards(u8, input[0 .. input.len - n], input[n..]);
|
||||
self.to_read.shrinkRetainingCapacity(input.len - n);
|
||||
return n;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue