0
0
mirror of https://github.com/vim/vim.git synced 2025-07-04 23:07:33 -04:00

updated for version 7.4b.022

Problem:    Not waiting for a character when the tick count overflows.
Solution:   Subtract the unsigned numbers and cast to int. (Ken Takata)
This commit is contained in:
Bram Moolenaar 2013-08-10 12:45:09 +02:00
parent b09129684b
commit b7512b79ce
2 changed files with 5 additions and 2 deletions

View File

@ -1357,9 +1357,10 @@ WaitForChar(long msec)
if (msec > 0)
{
/* If the specified wait time has passed, return. */
/* If the specified wait time has passed, return. Beware that
* GetTickCount() may wrap around (overflow). */
dwNow = GetTickCount();
if (dwNow >= dwEndTime)
if ((int)(dwNow - dwEndTime) >= 0)
break;
}
if (msec != 0)

View File

@ -727,6 +727,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
22,
/**/
21,
/**/