Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
r4v3n6101 committed Oct 16, 2024
1 parent 0969a2e commit d76e399
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "goldsrc-rs"
version = "0.13.2"
version = "0.13.3"
authors = ["r4v3n6101 <[email protected]>"]
edition = "2021"
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion src/parser/texture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ pub fn miptex<R: Read>(mut reader: R) -> io::Result<MipTexture> {
for _ in 0..(offsets[0].saturating_sub(40)) {
reader.read_u8()?;
}
let data_len = (pixels * 4 / 3) as u32 + 2 + 256 * 3;
let data_len = ((pixels * 85) >> 6) as u32 + 2 + 256 * 3;
let mut cursor = Cursor::new(vec![0; data_len as usize]);
reader.read_exact(cursor.get_mut())?;

Expand Down

0 comments on commit d76e399

Please sign in to comment.