mirror of
https://github.com/ziglang/zig.git
synced 2026-01-02 03:25:01 +00:00
Fix memcpy alias bug in std.compress.lzma
This commit is contained in:
parent
0595feb341
commit
d50bae4da9
@ -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…
x
Reference in New Issue
Block a user