aboutsummaryrefslogtreecommitdiff
path: root/sixel.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2024-03-07 15:20:29 +0000
committerDaniel Eklöf <daniel@ekloef.se>2024-03-07 15:20:29 +0000
commit75fd59df3f27f914729abd69d790e3a2a51c70e4 (patch)
tree798cf5a7977246a50fe12816137be5f972dffe02 /sixel.c
parentsixel: we no longer need the extra newline (diff)
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.
Diffstat (limited to 'sixel.c')
-rw-r--r--sixel.c3
1 files changed, 2 insertions, 1 deletions
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