Skip to content

Commit

Permalink
Update src/lib.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Andrew Duffy <[email protected]>
  • Loading branch information
XiangpengHao and a10y authored Oct 3, 2024
1 parent 3b579dd commit 7f221ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ impl<'a> Decompressor<'a> {
// SAFETY: out_pos is always 8 bytes or more from the end of decoded buffer
// SAFETY: ESCAPE_CODE can not be the last byte of the compressed stream
unsafe {
let write_addr = ptr.add(out_pos);
let write_addr = ptr.byte_add(out_pos);
std::ptr::write(write_addr, *compressed.get_unchecked(in_pos));
}
out_pos += 1;
Expand Down

0 comments on commit 7f221ef

Please sign in to comment.