From 0876c7eafe7bace4acde765305e2e4d38415ce7a Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sun, 4 Oct 2020 13:10:06 +0200 Subject: sixel: verify-no-wraparound-crossover: fix calculation of ‘end’ row MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sixel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.3