From 8fa8dfa2f9f714e560aac4985d99494da3092bff Mon Sep 17 00:00:00 2001 From: Truman Kilen Date: Sat, 11 Feb 2023 17:54:10 -0600 Subject: [PATCH] Fix reading path hash index --- repak/src/pak.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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));