From 75fd59df3f27f914729abd69d790e3a2a51c70e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Thu, 7 Mar 2024 16:20:29 +0100 Subject: [PATCH] sixel: debug: sixel image _may_ be zero-sized For example, and single GNL (Graphical New Line) will result in a sixel with a non-zero height, but a zero width. --- sixel.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sixel.c b/sixel.c index 605bc8b7..f3d57fb2 100644 --- a/sixel.c +++ b/sixel.c @@ -613,7 +613,8 @@ sixel_overwrite(struct terminal *term, struct sixel *six, pixman_region32_t cell_intersection; pixman_region32_init(&cell_intersection); pixman_region32_intersect(&cell_intersection, &six_rect, &overwrite_rect); - xassert(pixman_region32_not_empty(&cell_intersection)); + xassert(!pixman_region32_not_empty(&six_rect) || + pixman_region32_not_empty(&cell_intersection)); pixman_region32_fini(&cell_intersection); #endif