changeset 35841:f9d90d17c7a2 v9.1.0639

patch 9.1.0639: channel timeout may wrap around Commit: https://github.com/vim/vim/commit/0bee82b1d0a46a6ca6fb4ffcebd6a63d4141a355 Author: Ken Takata <kentkt@csc.jp> Date: Mon Jul 29 20:39:12 2024 +0200 patch 9.1.0639: channel timeout may wrap around Problem: channel timeout may wrap around Solution: Correct timeout calculation when GetTickCount() wraps around (Ken Takata) closes: #15390 Signed-off-by: Ken Takata <kentkt@csc.jp> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Mon, 29 Jul 2024 20:45:03 +0200
parents 6af3ff2cfa38
children ddd332ad53bb
files src/channel.c src/version.c
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/channel.c
+++ b/src/channel.c
@@ -2277,7 +2277,7 @@ channel_parse_json(channel_T *channel, c
 	{
 	    int timeout;
 #ifdef MSWIN
-	    timeout = GetTickCount() > chanpart->ch_deadline;
+	    timeout = (int)(GetTickCount() - chanpart->ch_deadline) > 0;
 #else
 	    {
 		struct timeval now_tv;
--- a/src/version.c
+++ b/src/version.c
@@ -705,6 +705,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    639,
+/**/
     638,
 /**/
     637,