From 78e7b8e2c4e10cd9da572ae2a82aacd9beb1b76d Mon Sep 17 00:00:00 2001 From: widberg Date: Thu, 26 Oct 2023 11:31:45 -0400 Subject: [PATCH] lzo is cursed --- bff/src/lz/lzo.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bff/src/lz/lzo.rs b/bff/src/lz/lzo.rs index 93cd7d4..09fb939 100644 --- a/bff/src/lz/lzo.rs +++ b/bff/src/lz/lzo.rs @@ -13,7 +13,7 @@ pub fn lzo_compress(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(), @@ -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(),