Small fixes

This commit is contained in:
momo5502
2024-12-26 09:37:10 +01:00
parent cb88ebe480
commit 724446620c
2 changed files with 10 additions and 4 deletions

View File

@@ -158,9 +158,13 @@ bool test_dir_io()
{
size_t count = 0;
for(auto i : std::filesystem::directory_iterator(R"(C:\Windows\System32\)"))
for (auto i : std::filesystem::directory_iterator(R"(C:\Windows\System32\)"))
{
++count;
if (count > 30)
{
return true;
}
}
return count > 30;

View File

@@ -2489,7 +2489,7 @@ namespace
const emulator_object<ALPC_MESSAGE_ATTRIBUTES>
/*send_message_attributes*/
,
const emulator_object<PORT_MESSAGE> /*receive_message*/,
const emulator_object<PORT_MESSAGE> receive_message,
const emulator_object<SIZE_T> /*buffer_length*/,
const emulator_object<ALPC_MESSAGE_ATTRIBUTES>
/*receive_message_attributes*/,
@@ -2507,12 +2507,14 @@ namespace
return STATUS_NOT_SUPPORTED;
}
/*const emulator_object<PORT_DATA_ENTRY> data{c.emu, receive_message.value() + 0x48};
// TODO: Fix this. This is broken and wrong.
const emulator_object<PORT_DATA_ENTRY> data{c.emu, receive_message.value() + 0x48};
const auto dest = data.read();
const auto base = reinterpret_cast<uint64_t>(dest.Base);
const auto value = base + 0x10;
c.emu.write_memory(base + 8, &value, sizeof(value));*/
c.emu.write_memory(base + 8, &value, sizeof(value));
return STATUS_SUCCESS;
}