summaryrefslogtreecommitdiffstats
path: root/src/drawscreen.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/drawscreen.c')
-rw-r--r--src/drawscreen.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/drawscreen.c b/src/drawscreen.c
index 453ca91c33..e0fb122995 100644
--- a/src/drawscreen.c
+++ b/src/drawscreen.c
@@ -2539,6 +2539,11 @@ win_update(win_T *wp)
eof = TRUE;
break;
}
+
+ // Safety check: if any of the wl_size values is wrong we might go over
+ // the end of w_lines[].
+ if (idx >= Rows)
+ break;
}
// End of loop over all window lines.