From 14b4231c0929cb794619acd431b5c8aa363863e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sun, 4 Oct 2020 13:10:06 +0200 Subject: [PATCH] =?UTF-8?q?sixel:=20verify-no-wraparound-crossover:=20fix?= =?UTF-8?q?=20calculation=20of=20=E2=80=98end=E2=80=99=20row?= 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