diff options
| -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) { | |||
| 837 | 837 | ||
| 838 | LOG_TRACE(Kernel_SVC, "called timer=0x%08X", handle); | 838 | LOG_TRACE(Kernel_SVC, "called timer=0x%08X", handle); |
| 839 | 839 | ||
| 840 | if (initial < 0 || interval < 0) { | ||
| 841 | return ResultCode(ErrorDescription::OutOfRange, ErrorModule::Kernel, | ||
| 842 | ErrorSummary::InvalidArgument, ErrorLevel::Permanent); | ||
| 843 | } | ||
| 844 | |||
| 840 | SharedPtr<Timer> timer = Kernel::g_handle_table.Get<Timer>(handle); | 845 | SharedPtr<Timer> timer = Kernel::g_handle_table.Get<Timer>(handle); |
| 841 | if (timer == nullptr) | 846 | if (timer == nullptr) |
| 842 | return ERR_INVALID_HANDLE; | 847 | return ERR_INVALID_HANDLE; |