Skip to content

Commit 5a69728

Browse files
committed
Add missing function argument
1 parent 77a8a09 commit 5a69728

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/replacement_files.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,9 @@ impl FileCtx {
269269
}
270270

271271
pub fn get_subfile(&self) -> &mut FileData {
272-
let mut loaded_arc = LoadedTables::get_instance().get_arc_mut();
273-
&mut loaded_arc.get_file_datas_mut()[self.index as usize]
272+
let loaded_arc = LoadedTables::get_instance().get_arc_mut();
273+
let file_info = *loaded_arc.get_file_info_from_hash(self.hash).unwrap();
274+
loaded_arc.get_file_data_mut(&file_info.to_owned(), smash_arc::Region::UsEnglish)
274275
}
275276

276277
pub fn get_file_content(&self) -> Vec<u8> {
@@ -282,7 +283,7 @@ impl FileCtx {
282283
let loaded_tables = LoadedTables::get_instance();
283284
let arc = loaded_tables.get_arc();
284285

285-
match loaded_tables.get_arc().get_file_data_from_hash(self.hash) {
286+
match loaded_tables.get_arc().get_file_data_from_hash(self.hash, smash_arc::Region::UsEnglish) {
286287
Ok(_) => {},
287288
Err(_) => {
288289
println!("[ARC::Patching] File '{}' does not have a hash found in FileData, skipping",self.path.display());

0 commit comments

Comments
 (0)