diff --git a/apps/victory/src/run.rs b/apps/victory/src/run.rs index 0c7bf46..6706904 100644 --- a/apps/victory/src/run.rs +++ b/apps/victory/src/run.rs @@ -68,6 +68,7 @@ pub fn run( // and their patched copy are not read again, and were held for the // whole run (two blocks of 114.7 MB each for the title, in // physical memory: run 65's memory map). + let image_name = prepared.file_name(); drop(prepared); drop(original); victory_hle::runtime::set_main_image(image.base()); @@ -163,9 +164,9 @@ pub fn run( let exe_name = exe.file_name().unwrap_or_default().to_string_lossy(); show(&exe_name, image.bind_imports(&with_dlls, policy)?); if execute { - let (name, size) = (prepared.file_name(), image.info().size_of_image as usize); + let size = image.info().size_of_image as usize; // SAFETY: the image stays mapped, and nothing of it has run yet. - unsafe { victory_loader::write_sites::apply_asked(&name, image.base(), size) }; + unsafe { victory_loader::write_sites::apply_asked(&image_name, image.base(), size) }; } if !execute { println!("not executing (pass --execute to start the title)");