Skip to content

Commit

Permalink
lzo is cursed
Browse files Browse the repository at this point in the history
  • Loading branch information
widberg committed Oct 26, 2023
1 parent a29fb78 commit 78e7b8e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bff/src/lz/lzo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub fn lzo_compress<W: Write>(data: &[u8], writer: &mut W, _endian: Endian) -> B
unsafe {
let result = lzo1x_1_compress(
data.as_ptr(),
data.len() as u32,
data.len().try_into().unwrap(),
compressed.as_mut_ptr(),
&mut compressed_len,
null_mut(),
Expand All @@ -34,7 +34,7 @@ pub fn lzo_decompress(compressed: &[u8], decompressed_buffer_size: usize) -> Bff
unsafe {
let result = lzo1x_decompress_safe(
compressed.as_ptr(),
compressed.len() as u32,
compressed.len().try_into().unwrap(),
decompressed.as_mut_ptr(),
&mut decompressed_len,
null_mut(),
Expand Down

0 comments on commit 78e7b8e

Please sign in to comment.