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.
This commit is contained in:
Daniel Eklöf 2024-03-07 16:20:29 +01:00
parent a2fa667f45
commit 75fd59df3f
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -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