summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-07-24 15:55:15 +0200
committerLioncash <mathew1800@gmail.com>2018-07-24 15:55:17 +0200
commitc73410bf2c58a17e0411456ea0ddb6d91872e079 (patch)
treeedf9d381857d652b1be8edebe22496efa63e3034 /src/core/hle/kernel
parentMerge pull request #798 from lioncash/const (diff)
downloadyuzu-c73410bf2c58a17e0411456ea0ddb6d91872e079.tar
yuzu-c73410bf2c58a17e0411456ea0ddb6d91872e079.tar.gz
yuzu-c73410bf2c58a17e0411456ea0ddb6d91872e079.tar.bz2
yuzu-c73410bf2c58a17e0411456ea0ddb6d91872e079.tar.lz
yuzu-c73410bf2c58a17e0411456ea0ddb6d91872e079.tar.xz
yuzu-c73410bf2c58a17e0411456ea0ddb6d91872e079.tar.zst
yuzu-c73410bf2c58a17e0411456ea0ddb6d91872e079.zip
Diffstat (limited to 'src/core/hle/kernel')
-rw-r--r--src/core/hle/kernel/svc.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index 7b41c9cfd..da7cacb57 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -165,11 +165,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;
}