From bcc0c2d6e2fe39a96a97734e183521fc1dc751d4 Mon Sep 17 00:00:00 2001 From: Raytwo Date: Wed, 9 Sep 2020 01:32:39 +0200 Subject: [PATCH] Crash fixes --- src/patching.rs | 4 ++-- src/resource.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/patching.rs b/src/patching.rs index 91474c17d..c72f552e8 100644 --- a/src/patching.rs +++ b/src/patching.rs @@ -231,14 +231,14 @@ pub fn filesize_replacement() { ); } } else { - //if (subfile.decompressed_size < metadata.len() as u32) { + if (subfile.decompressed_size < metadata.len() as u32) { subfile.decompressed_size = metadata.len() as u32; println!( "[ARC::Patching] New decompressed size for {}: {:#x}", path.as_path().display(), subfile.decompressed_size ); - //} + } } } } diff --git a/src/resource.rs b/src/resource.rs index f131aa567..2e4c9284f 100644 --- a/src/resource.rs +++ b/src/resource.rs @@ -215,7 +215,7 @@ impl LoadedArc { // Regional if (file_info.flags & 0x00008000) == 0x8000 { sub_index = self.lookup_fileinfosubindex_by_index( - file_info.sub_index_index + 1 + ResServiceState::get_instance().regular_region_idx, + file_info.sub_index_index + 1 + ResServiceState::get_instance().regular_region_idx ); }