Commit 1a0832b2 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Win32: fix unlikely Sleep() overflow

parent f044d6ff
......@@ -373,7 +373,9 @@ void msleep( mtime_t delay )
snooze( delay );
#elif defined( WIN32 ) || defined( UNDER_CE )
Sleep( (DWORD) (delay / 1000) );
for (delay /= 1000; delay > 0x7fffffff; delay -= 0x7fffffff)
Sleep (0x7fffffff);
Sleep (delay);
#elif defined( HAVE_NANOSLEEP )
struct timespec ts_delay;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment