diff options
author | Subv <subv2112@gmail.com> | 2017-10-04 18:40:40 +0200 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2017-10-04 19:30:32 +0200 |
commit | b863d6c86043226c8c88749c4e0eecaf9865c569 (patch) | |
tree | b73ef73e6a2f7f7cb7fc0cb9c33ff1f7a5b00291 /src/core/hle/svc.cpp | |
parent | Memory: Remove all GetPointer usages from the GDB stub. (diff) | |
download | yuzu-b863d6c86043226c8c88749c4e0eecaf9865c569.tar yuzu-b863d6c86043226c8c88749c4e0eecaf9865c569.tar.gz yuzu-b863d6c86043226c8c88749c4e0eecaf9865c569.tar.bz2 yuzu-b863d6c86043226c8c88749c4e0eecaf9865c569.tar.lz yuzu-b863d6c86043226c8c88749c4e0eecaf9865c569.tar.xz yuzu-b863d6c86043226c8c88749c4e0eecaf9865c569.tar.zst yuzu-b863d6c86043226c8c88749c4e0eecaf9865c569.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/svc.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp index 6be5db13f..9edce7ab7 100644 --- a/src/core/hle/svc.cpp +++ b/src/core/hle/svc.cpp @@ -303,12 +303,11 @@ static ResultCode WaitSynchronization1(Kernel::Handle handle, s64 nano_seconds) } /// Wait for the given handles to synchronize, timeout after the specified nanoseconds -static ResultCode WaitSynchronizationN(s32* out, Kernel::Handle* handles, s32 handle_count, +static ResultCode WaitSynchronizationN(s32* out, VAddr handles_address, s32 handle_count, bool wait_all, s64 nano_seconds) { Kernel::Thread* thread = Kernel::GetCurrentThread(); - // Check if 'handles' is invalid - if (handles == nullptr) + if (!Memory::IsValidVirtualAddress(handles_address)) return Kernel::ERR_INVALID_POINTER; // NOTE: on real hardware, there is no nullptr check for 'out' (tested with firmware 4.4). If @@ -323,7 +322,8 @@ static ResultCode WaitSynchronizationN(s32* out, Kernel::Handle* handles, s32 ha std::vector<ObjectPtr> objects(handle_count); for (int i = 0; i < handle_count; ++i) { - auto object = Kernel::g_handle_table.Get<Kernel::WaitObject>(handles[i]); + Kernel::Handle handle = Memory::Read32(handles_address + i * sizeof(Kernel::Handle)); + auto object = Kernel::g_handle_table.Get<Kernel::WaitObject>(handle); if (object == nullptr) return ERR_INVALID_HANDLE; objects[i] = object; |