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.
Files:      src/ex_cmds2.c


*** ../vim-7.4.2360/src/ex_cmds2.c      2016-09-05 22:45:25.068731124 +0200
--- src/ex_cmds2.c      2016-09-10 19:01:19.941239543 +0200
***************
*** 1143,1152 ****
  create_timer(long msec, int repeat)
  {
      timer_T   *timer = (timer_T *)alloc_clear(sizeof(timer_T));
  
      if (timer == NULL)
        return NULL;
!     if (++last_timer_id < 0)
        /* Overflow!  Might cause duplicates... */
        last_timer_id = 0;
      timer->tr_id = last_timer_id;
--- 1143,1153 ----
  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 <= prev_id)
        /* Overflow!  Might cause duplicates... */
        last_timer_id = 0;
      timer->tr_id = last_timer_id;
*** ../vim-7.4.2360/src/version.c       2016-09-10 15:52:47.087124414 +0200
--- src/version.c       2016-09-10 19:04:46.070402320 +0200
***************
*** 765,766 ****
--- 765,768 ----
  {   /* Add new patch number below this line */
+ /**/
+     2361,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
227. You sleep next to your monitor.  Or on top of it.

 /// Bram Moolenaar -- [email protected] -- 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    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui