aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-01-06 15:57:07 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-01-06 15:57:07 +0000
commit124759bd2cb2bc0eb69cae4867afa8b95dd6f31a (patch)
treed23135a2ccea22a851861a7b4097e0b057d4783e
parentselection: extend-block: update pivot point and selection direction (diff)
render: sixel: fix assertion: x/y coords may be outside visible area
But when they are, width/height must be 0.
-rw-r--r--render.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/render.c b/render.c
index 6995a51b..669b7f67 100644
--- a/render.c
+++ b/render.c
@@ -893,8 +893,8 @@ render_sixel_chunk(struct terminal *term, pixman_image_t *pix, const struct sixe
/* Verify we're not stepping outside the grid */
assert(x >= term->margins.left);
assert(y >= term->margins.top);
- assert(x + width <= term->width - term->margins.right);
- assert(y + height <= term->height - term->margins.bottom);
+ assert(width == 0 || x + width <= term->width - term->margins.right);
+ assert(height == 0 || y + height <= term->height - term->margins.bottom);
//LOG_DBG("sixel chunk: %dx%d %dx%d", x, y, width, height);