diff options
author | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2017-02-24 20:48:31 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-24 20:48:31 -0800 |
commit | fb5301cf6e7fd5d9ff2ea28b0ee610a7861146e6 (patch) | |
tree | f913ca09229ad69b2a7af02fc7564481b316cf70 /src/core/hle/svc.cpp | |
parent | 0be8f8716cd24cb21e541dc4de6865134dfd51a7 (diff) | |
parent | 0be77c3ae471f3bed5215b84d7e1d702f2ec1696 (diff) |
Merge pull request #2421 from Subv/timers
Timers: Immediately signal the timer if it was started with an initial value of 0
Diffstat (limited to 'src/core/hle/svc.cpp')
-rw-r--r-- | src/core/hle/svc.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp index 96db39ad9..1baa80671 100644 --- a/src/core/hle/svc.cpp +++ b/src/core/hle/svc.cpp @@ -837,6 +837,11 @@ static ResultCode SetTimer(Kernel::Handle handle, s64 initial, s64 interval) { LOG_TRACE(Kernel_SVC, "called timer=0x%08X", handle); + if (initial < 0 || interval < 0) { + return ResultCode(ErrorDescription::OutOfRange, ErrorModule::Kernel, + ErrorSummary::InvalidArgument, ErrorLevel::Permanent); + } + SharedPtr<Timer> timer = Kernel::g_handle_table.Get<Timer>(handle); if (timer == nullptr) return ERR_INVALID_HANDLE; |