mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 05:40:04 +00:00 
			
		
		
		
	Timers: Return an error when calling SetTimer with negative timeouts.
This commit is contained in:
		
							parent
							
								
									029a11030e
								
							
						
					
					
						commit
						0be77c3ae4
					
				
					 1 changed files with 5 additions and 0 deletions
				
			
		|  | @ -837,6 +837,11 @@ static ResultCode SetTimer(Kernel::Handle handle, s64 initial, s64 interval) { | ||||||
| 
 | 
 | ||||||
|     LOG_TRACE(Kernel_SVC, "called timer=0x%08X", handle); |     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); |     SharedPtr<Timer> timer = Kernel::g_handle_table.Get<Timer>(handle); | ||||||
|     if (timer == nullptr) |     if (timer == nullptr) | ||||||
|         return ERR_INVALID_HANDLE; |         return ERR_INVALID_HANDLE; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue