diff options
author | nicm <nicm> | 2019-04-01 19:33:38 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2019-04-02 07:33:33 +0100 |
commit | 6d071c468cbed78426eebdaab0639dac873cd39f (patch) | |
tree | c7713c5677e91f886c9c17963e7c93355f2e9926 | |
parent | 92da105b58d2b828974585f21b70d5f1b42049fe (diff) | |
download | rtmux-6d071c468cbed78426eebdaab0639dac873cd39f.tar.gz rtmux-6d071c468cbed78426eebdaab0639dac873cd39f.tar.bz2 rtmux-6d071c468cbed78426eebdaab0639dac873cd39f.zip |
Restore a check to stop scrolled lines becoming larger than total lines,
fixes a crash reported by Thomas Sattler.
-rw-r--r-- | grid.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -1284,6 +1284,8 @@ grid_reflow(struct grid *gd, u_int sx) if (target->sy < gd->sy) grid_reflow_add(target, gd->sy - target->sy); gd->hsize = target->sy - gd->sy; + if (gd->hscrolled > gd->hsize) + gd->hscrolled = gd->hsize; free(gd->linedata); gd->linedata = target->linedata; free(target); |