summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2017-01-09 19:02:44 +0100
committerSubv <subv2112@gmail.com>2017-02-22 02:51:56 +0100
commit0be77c3ae471f3bed5215b84d7e1d702f2ec1696 (patch)
tree04e9ed669d18b7bbaff3d63154c989570707ee6d /src/core
parentTimers: Immediately signal the timer if it was started with an initial value of 0. (diff)
downloadyuzu-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 'src/core')
-rw-r--r--src/core/hle/svc.cpp5
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;