mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
sixel: don't try to emit a sixel if we're outside the image's boundaries
Closes #1634
This commit is contained in:
parent
75fd59df3f
commit
3e6f0e63f3
1 changed files with 3 additions and 0 deletions
3
sixel.c
3
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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue