aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/screen.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/screen.c b/src/screen.c
index 923f8ee..57b536d 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -55,10 +55,10 @@ void runes_screen_set_window_size(RunesTerm *t)
scr->grid->rows[i].cells = realloc(
scr->grid->rows[i].cells,
scr->grid->max.col * sizeof(struct runes_cell));
- if (old_size.col > scr->grid->max.col) {
+ if (old_size.col < scr->grid->max.col) {
memset(
- &scr->grid->rows[i].cells[scr->grid->max.col], 0,
- (old_size.col - scr->grid->max.col) * sizeof(struct runes_cell));
+ &scr->grid->rows[i].cells[old_size.col], 0,
+ (scr->grid->max.col - old_size.col) * sizeof(struct runes_cell));
}
}