aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-10-04 11:10:06 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-10-11 17:25:31 +0000
commit0876c7eafe7bace4acde765305e2e4d38415ce7a (patch)
tree513070722953f256a23930778e99108c6a6050b2
parentsixel: add sixel_cell_size_changed() (diff)
sixel: verify-no-wraparound-crossover: fix calculation of ‘end’ row
-rw-r--r--sixel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sixel.c b/sixel.c
index 110c8ab5..32af3a65 100644
--- a/sixel.c
+++ b/sixel.c
@@ -156,7 +156,7 @@ verify_no_wraparound_crossover(const struct terminal *term)
assert(six->pos.row >= 0);
assert(six->pos.row < term->grid->num_rows);
- int end = (six->pos.row + six->rows) & (term->grid->num_rows - 1);
+ int end = (six->pos.row + six->rows - 1) & (term->grid->num_rows - 1);
assert(end >= six->pos.row);
}
#endif