diff --git a/repak/src/pak.rs b/repak/src/pak.rs index 8c20db6..7997339 100644 --- a/repak/src/pak.rs +++ b/repak/src/pak.rs @@ -238,7 +238,7 @@ impl Pak { let mut path_hash_index = vec![]; let mut phi_reader = io::Cursor::new(&mut path_hash_index_buf); - for _ in 0..len { + for _ in 0..phi_reader.read_u32::()? { let hash = phi_reader.read_u64::()?; let encoded_entry_offset = phi_reader.read_u32::()?; path_hash_index.push((hash, encoded_entry_offset));