aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sixel.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sixel.c b/sixel.c
index f3d57fb2..7684e657 100644
--- a/sixel.c
+++ b/sixel.c
@@ -1549,6 +1549,9 @@ sixel_add_one_ar_11(struct terminal *term, uint8_t c)
resize_horizontally(term, col + count);
width = term->sixel.image.width;
count = min(count, max(width - col, 0));
+
+ if (unlikely(count == 0))
+ return;
}
sixel_add_ar_11(term, term->sixel.image.p, width, term->sixel.color, c);