From 7cc8ec47208f784418e40d1ede49c4aeb95b0b53 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 27 Jan 2015 20:59:31 +0100 Subject: [PATCH] updated for version 7.4.606 Problem: May crash when using a small window. Solution: Avoid dividing by zero. (Christian Brabandt) --- src/normal.c | 2 ++ src/version.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/normal.c b/src/normal.c index cb1a7d154a..74a001e823 100644 --- a/src/normal.c +++ b/src/normal.c @@ -4457,6 +4457,8 @@ nv_screengo(oap, dir, dist) 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) diff --git a/src/version.c b/src/version.c index 17e442f8a2..72d85b6184 100644 --- a/src/version.c +++ b/src/version.c @@ -741,6 +741,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 606, /**/ 605, /**/