aboutsummaryrefslogtreecommitdiff
path: root/sixel.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2022-02-03 18:23:43 +0000
committerDaniel Eklöf <daniel@ekloef.se>2022-02-04 17:14:24 +0000
commit9e8d553a21c3a96ede2c830de695f6a255538cdd (patch)
tree7acbfab8806486e856189fd4e6aefe4427484e32 /sixel.c
parentsixel: resize: truncate instead of failing, when new size exceeds max size (diff)
sixel: DECGRI (repeat) with a count of 0 should emit a single sixel
Diffstat (limited to 'sixel.c')
-rw-r--r--sixel.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sixel.c b/sixel.c
index 335700c5..fbd0f077 100644
--- a/sixel.c
+++ b/sixel.c
@@ -1451,6 +1451,8 @@ decgri(struct terminal *term, uint8_t c)
unsigned count = term->sixel.param;
if (likely(count > 0))
sixel_add_many(term, c - 63, count);
+ else if (unlikely(count == 0))
+ sixel_add_many(term, c - 63, 1);
term->sixel.state = SIXEL_DECSIXEL;
break;
}