Blame SOURCES/7.4.606

d6ba96
To: vim_dev@googlegroups.com
d6ba96
Subject: Patch 7.4.606
d6ba96
Fcc: outbox
d6ba96
From: Bram Moolenaar <Bram@moolenaar.net>
d6ba96
Mime-Version: 1.0
d6ba96
Content-Type: text/plain; charset=UTF-8
d6ba96
Content-Transfer-Encoding: 8bit
d6ba96
------------
d6ba96
d6ba96
Patch 7.4.606
d6ba96
Problem:    May crash when using a small window.
d6ba96
Solution:   Avoid dividing by zero. (Christian Brabandt)
d6ba96
Files:	    src/normal.c
d6ba96
d6ba96
d6ba96
*** ../vim-7.4.605/src/normal.c	2015-01-14 17:52:26.603094340 +0100
d6ba96
--- src/normal.c	2015-01-27 20:59:18.721057793 +0100
d6ba96
***************
d6ba96
*** 4457,4462 ****
d6ba96
--- 4457,4464 ----
d6ba96
      col_off2 = col_off1 - curwin_col_off2();
d6ba96
      width1 = W_WIDTH(curwin) - col_off1;
d6ba96
      width2 = W_WIDTH(curwin) - col_off2;
d6ba96
+     if (width2 == 0)
d6ba96
+ 	width2 = 1; /* avoid divide by zero */
d6ba96
  
d6ba96
  #ifdef FEAT_VERTSPLIT
d6ba96
      if (curwin->w_width != 0)
d6ba96
*** ../vim-7.4.605/src/version.c	2015-01-27 18:43:42.138535469 +0100
d6ba96
--- src/version.c	2015-01-27 20:41:07.697066323 +0100
d6ba96
***************
d6ba96
*** 743,744 ****
d6ba96
--- 743,746 ----
d6ba96
  {   /* Add new patch number below this line */
d6ba96
+ /**/
d6ba96
+     606,
d6ba96
  /**/
d6ba96
d6ba96
-- 
d6ba96
hundred-and-one symptoms of being an internet addict:
d6ba96
132. You come back and check this list every half-hour.
d6ba96
d6ba96
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
d6ba96
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
d6ba96
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
d6ba96
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///