mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
Interpret negative arguments to sqlite3_sleep() as zero.
FossilOrigin-Name: 2b542326aa8e7e1f6ed9d999b95ae5340278e0821277a17de3cc803b4af793ae
This commit is contained in:
@@ -3933,7 +3933,7 @@ int sqlite3_sleep(int ms){
|
||||
/* This function works in milliseconds, but the underlying OsSleep()
|
||||
** API uses microseconds. Hence the 1000's.
|
||||
*/
|
||||
rc = (sqlite3OsSleep(pVfs, 1000*ms)/1000);
|
||||
rc = (sqlite3OsSleep(pVfs, ms<0 ? 0 : 1000*ms)/1000);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user