mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
sixel: decgri: avoid load inside for-loop
This commit is contained in:
parent
9f224a13df
commit
777576b66b
1 changed files with 2 additions and 1 deletions
3
sixel.c
3
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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue