diff options
| author | CismonX <admin@cismon.net> | 2023-07-10 16:51:32 +0000 |
|---|---|---|
| committer | CismonX <admin@cismon.net> | 2023-07-10 16:51:32 +0000 |
| commit | dbee099eebc46bd6a72f4be1b65c5552f02d471a (patch) | |
| tree | 02521f97e9015a22c3ef420cf82f41363bc216b6 /sixel.c | |
| parent | Merge branch 'control-shift-u' (diff) | |
sixel: fix regression for DECGRI with a repeat count of 0
Diffstat (limited to 'sixel.c')
| -rw-r--r-- | sixel.c | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -1703,7 +1703,11 @@ decgri_generic(struct terminal *term, uint8_t c) } case '?' ... '~': { - const unsigned count = term->sixel.repeat_count; + unsigned count = term->sixel.repeat_count; + if (unlikely(count == 0)) { + count = 1; + } + sixel_add_many_generic(term, c - 63, count); term->sixel.state = SIXEL_DECSIXEL; break; @@ -1722,7 +1726,11 @@ static void decgri_ar_11(struct terminal *term, uint8_t c) { if (likely(c >= '?' && c <= '~')) { - const unsigned count = term->sixel.repeat_count; + unsigned count = term->sixel.repeat_count; + if (unlikely(count == 0)) { + count = 1; + } + sixel_add_many_ar_11(term, c - 63, count); term->sixel.state = SIXEL_DECSIXEL; } else |
