diff options
author | Subv <subv2112@gmail.com> | 2017-01-09 19:02:44 +0100 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2017-02-22 02:51:56 +0100 |
commit | 0be77c3ae471f3bed5215b84d7e1d702f2ec1696 (patch) | |
tree | 04e9ed669d18b7bbaff3d63154c989570707ee6d /src/core/hle/svc.cpp | |
parent | Timers: Immediately signal the timer if it was started with an initial value of 0. (diff) | |
download | yuzu-0be77c3ae471f3bed5215b84d7e1d702f2ec1696.tar yuzu-0be77c3ae471f3bed5215b84d7e1d702f2ec1696.tar.gz yuzu-0be77c3ae471f3bed5215b84d7e1d702f2ec1696.tar.bz2 yuzu-0be77c3ae471f3bed5215b84d7e1d702f2ec1696.tar.lz yuzu-0be77c3ae471f3bed5215b84d7e1d702f2ec1696.tar.xz yuzu-0be77c3ae471f3bed5215b84d7e1d702f2ec1696.tar.zst yuzu-0be77c3ae471f3bed5215b84d7e1d702f2ec1696.zip |
Diffstat (limited to '')
-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; |