To: vim_dev@googlegroups.com Subject: Patch 7.4b.022 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 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) Files: src/os_win32.c *** ../vim-7.4b.021/src/os_win32.c 2013-07-24 13:41:19.000000000 +0200 --- src/os_win32.c 2013-08-10 12:39:12.000000000 +0200 *************** *** 1357,1365 **** if (msec > 0) { ! /* If the specified wait time has passed, return. */ dwNow = GetTickCount(); ! if (dwNow >= dwEndTime) break; } if (msec != 0) --- 1357,1366 ---- if (msec > 0) { ! /* If the specified wait time has passed, return. Beware that ! * GetTickCount() may wrap around (overflow). */ dwNow = GetTickCount(); ! if ((int)(dwNow - dwEndTime) >= 0) break; } if (msec != 0) *** ../vim-7.4b.021/src/version.c 2013-08-09 20:38:23.000000000 +0200 --- src/version.c 2013-08-10 12:42:46.000000000 +0200 *************** *** 729,730 **** --- 729,732 ---- { /* Add new patch number below this line */ + /**/ + 22, /**/ -- hundred-and-one symptoms of being an internet addict: 73. You give your dog used motherboards instead of bones /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///