diff options
Diffstat (limited to 'src/core/hle/kernel')
-rw-r--r-- | src/core/hle/kernel/svc.cpp | 11 | ||||
-rw-r--r-- | src/core/hle/kernel/thread.cpp | 1 | ||||
-rw-r--r-- | src/core/hle/kernel/timer.cpp | 1 |
3 files changed, 9 insertions, 4 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index 3e236cfd5..0b439401a 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp @@ -167,11 +167,14 @@ static ResultCode WaitSynchronization(Handle* index, VAddr handles_address, u64 using ObjectPtr = SharedPtr<WaitObject>; std::vector<ObjectPtr> objects(handle_count); - for (int i = 0; i < handle_count; ++i) { - Handle handle = Memory::Read32(handles_address + i * sizeof(Handle)); - auto object = g_handle_table.Get<WaitObject>(handle); - if (object == nullptr) + for (u64 i = 0; i < handle_count; ++i) { + const Handle handle = Memory::Read32(handles_address + i * sizeof(Handle)); + const auto object = g_handle_table.Get<WaitObject>(handle); + + if (object == nullptr) { return ERR_INVALID_HANDLE; + } + objects[i] = object; } diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index cd85c4b7c..94735c86e 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp @@ -14,6 +14,7 @@ #include "core/arm/arm_interface.h" #include "core/core.h" #include "core/core_timing.h" +#include "core/core_timing_util.h" #include "core/hle/kernel/errors.h" #include "core/hle/kernel/handle_table.h" #include "core/hle/kernel/kernel.h" diff --git a/src/core/hle/kernel/timer.cpp b/src/core/hle/kernel/timer.cpp index 0141125e4..904a3d0a5 100644 --- a/src/core/hle/kernel/timer.cpp +++ b/src/core/hle/kernel/timer.cpp @@ -6,6 +6,7 @@ #include "common/assert.h" #include "common/logging/log.h" #include "core/core_timing.h" +#include "core/core_timing_util.h" #include "core/hle/kernel/handle_table.h" #include "core/hle/kernel/kernel.h" #include "core/hle/kernel/thread.h" |