Redirect zero base memory image requests to main exe

This commit is contained in:
Maurice Heumann
2025-05-08 18:30:50 +02:00
parent 43d29ce723
commit 3e7f6e5fc1

View File

@@ -66,7 +66,10 @@ namespace syscalls
return STATUS_BUFFER_OVERFLOW;
}
const auto* mod = c.win_emu.mod_manager.find_by_address(base_address);
const auto* mod = base_address == 0 //
? c.win_emu.mod_manager.executable
: c.win_emu.mod_manager.find_by_address(base_address);
if (!mod)
{
c.win_emu.log.error("Bad address for memory image request: 0x%" PRIx64 "\n", base_address);