Fix thread handles

This commit is contained in:
Maurice Heumann
2025-02-04 20:34:53 +01:00
parent 83edab3564
commit cc4064611f
2 changed files with 3 additions and 2 deletions

View File

@@ -347,7 +347,7 @@ class moved_marker
bool was_moved_{false};
};
class emulator_thread : ref_counted_object
class emulator_thread : public ref_counted_object
{
public:
emulator_thread(x64_emulator& emu)

View File

@@ -3519,10 +3519,11 @@ namespace
}
bool return_next_thread = thread_handle == NULL_HANDLE;
for (const auto& t : c.proc.threads)
for (auto& t : c.proc.threads)
{
if (return_next_thread && !t.second.is_terminated())
{
++t.second.ref_count;
new_thread_handle.write(c.proc.threads.make_handle(t.first));
return STATUS_SUCCESS;
}