# HG changeset patch # User Christian Brabandt # Date 1473528606 -7200 # Node ID 40f6ce4fe30ef4c28275e055d3082f5206abe156 # Parent 4584cd99e7eaabca278725da7f54102fbe314d82 commit https://github.com/vim/vim/commit/ee39ef0b93d31763d05e54ba99801e3f1a254c0d Author: Bram Moolenaar Date: Sat Sep 10 19:17:42 2016 +0200 patch 7.4.2361 Problem: Checking for last_timer_id to overflow is not reliable. (Ozaki Kiichi) Solution: Check for the number not going up. diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c --- a/src/ex_cmds2.c +++ b/src/ex_cmds2.c @@ -1143,10 +1143,11 @@ free_timer(timer_T *timer) create_timer(long msec, int repeat) { timer_T *timer = (timer_T *)alloc_clear(sizeof(timer_T)); + long prev_id = last_timer_id; if (timer == NULL) return NULL; - if (++last_timer_id < 0) + if (++last_timer_id <= prev_id) /* Overflow! Might cause duplicates... */ last_timer_id = 0; timer->tr_id = last_timer_id; diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -764,6 +764,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 2361, +/**/ 2360, /**/ 2359,