summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-08-10 12:45:09 +0200
committerBram Moolenaar <Bram@vim.org>2013-08-10 12:45:09 +0200
commitb7512b79ce62b5dba75eb5768ec5f0d0fddb49ee (patch)
treea1faffef49270e2b24b14fcf57f83e285d591157
parentb09129684b15de58bd2eea8328a8d91896f3e7d9 (diff)
downloadvim-git-b7512b79ce62b5dba75eb5768ec5f0d0fddb49ee.tar.gz
updated for version 7.4b.022v7.4b.022
Problem: Not waiting for a character when the tick count overflows. Solution: Subtract the unsigned numbers and cast to int. (Ken Takata)
-rw-r--r--src/os_win32.c5
-rw-r--r--src/version.c2
2 files changed, 5 insertions, 2 deletions
diff --git a/src/os_win32.c b/src/os_win32.c
index 48cc4c5dc..4013353cf 100644
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -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)
diff --git a/src/version.c b/src/version.c
index 59476e523..f02bf3552 100644
--- a/src/version.c
+++ b/src/version.c
@@ -728,6 +728,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 22,
+/**/
21,
/**/
20,