diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2024-03-07 15:21:06 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2024-03-07 15:21:06 +0000 |
| commit | 3e6f0e63f3027f19a83c6a2ddcf52018d30f2751 (patch) | |
| tree | 2aabe343453ed2033572b5a327acbf8f89ef6fbc /sixel.c | |
| parent | sixel: debug: sixel image _may_ be zero-sized (diff) | |
sixel: don't try to emit a sixel if we're outside the image's boundaries
Closes #1634
Diffstat (limited to 'sixel.c')
| -rw-r--r-- | sixel.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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); |
