File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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( ) ) ;
You can’t perform that action at this time.
0 commit comments