| To: vim_dev@googlegroups.com |
| Subject: Patch 7.4.606 |
| Fcc: outbox |
| From: Bram Moolenaar <Bram@moolenaar.net> |
| Mime-Version: 1.0 |
| Content-Type: text/plain; charset=UTF-8 |
| Content-Transfer-Encoding: 8bit |
| |
| |
| Patch 7.4.606 |
| Problem: May crash when using a small window. |
| Solution: Avoid dividing by zero. (Christian Brabandt) |
| Files: src/normal.c |
| |
| |
| |
| |
| |
| *** 4457,4462 **** |
| --- 4457,4464 ---- |
| col_off2 = col_off1 - curwin_col_off2(); |
| width1 = W_WIDTH(curwin) - col_off1; |
| width2 = W_WIDTH(curwin) - col_off2; |
| + if (width2 == 0) |
| + width2 = 1; /* avoid divide by zero */ |
| |
| #ifdef FEAT_VERTSPLIT |
| if (curwin->w_width != 0) |
| |
| |
| |
| *** 743,744 **** |
| --- 743,746 ---- |
| { /* Add new patch number below this line */ |
| + /**/ |
| + 606, |
| /**/ |
| |
| -- |
| hundred-and-one symptoms of being an internet addict: |
| 132. You come back and check this list every half-hour. |
| |
| /// 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 /// |