mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-18 03:13:55 +00:00
Replace write with try_write in the handle_query function
This commit is contained in:
@@ -232,17 +232,7 @@ NTSTATUS handle_query(x86_64_emulator& emu, const uint64_t buffer, const uint32_
|
||||
const auto length_setter = [&](const size_t required_size) {
|
||||
if (return_length)
|
||||
{
|
||||
try
|
||||
{
|
||||
// VMProtect is trying to pass an incorrect return address.
|
||||
// This can run on the original version of Windows, but in
|
||||
// the emulator, this will cause an exception.
|
||||
return_length.write(static_cast<LengthType>(required_size));
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
|
||||
}
|
||||
return_length.try_write(static_cast<LengthType>(required_size));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user