The image's name is kept for VICTORY_WRITE_SITES (the program did not build)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
2ad419b24d
commit
ebdefa6f99
1 file changed
+3
-2
@@ -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)");
|
||||
|
||||
Reference in new issue
Block a user