aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sixel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sixel.c b/sixel.c
index 7ff5780d..10aa1f94 100644
--- a/sixel.c
+++ b/sixel.c
@@ -1158,9 +1158,10 @@ decgri(struct terminal *term, uint8_t c)
case 'w': case 'x': case 'y': case 'z': case '{': case '|': case '}':
case '~': {
//LOG_DBG("repeating '%c' %u times", c, term->sixel.param);
+ unsigned count = term->sixel.param;
uint32_t color = term->sixel.palette[term->sixel.color_idx];
- for (unsigned i = 0; i < term->sixel.param; i++)
+ for (unsigned i = 0; i < count; i++)
sixel_add(term, color, c - 63);
term->sixel.state = SIXEL_DECSIXEL;