diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-03-06 18:48:37 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-03-11 16:32:55 +0000 |
| commit | 47e4cfbf5c5f016fd1051ae811e246b3b9e25579 (patch) | |
| tree | 51e70d12e0568e5edc57c662b8e6fbca2d31a457 | |
| parent | sixel: avoid multiplication inside the inner sixel emitter loop (diff) | |
sixel: ignore invalid sixel characters in DECGRI (repeat)
| -rw-r--r-- | sixel.c | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -1049,13 +1049,23 @@ decgri(struct terminal *term, uint8_t c) term->sixel.param += c - '0'; break; - default: + case '?': case '@': case 'A': case 'B': case 'C': case 'D': case 'E': + case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': + case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': + case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': + case '[': case '\\': case ']': case '^': case '_': case '`': case 'a': + case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': + case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': + case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': + case 'w': case 'x': case 'y': case 'z': case '{': case '|': case '}': + case '~': { //LOG_DBG("repeating '%c' %u times", c, term->sixel.param); for (unsigned i = 0; i < term->sixel.param; i++) decsixel(term, c); term->sixel.state = SIXEL_DECSIXEL; break; } + } } static void |
