diff options
author | Steven Schubiger <stsc@refcnt.org> | 2013-02-08 15:42:21 +0100 |
---|---|---|
committer | Steven Schubiger <stsc@refcnt.org> | 2013-02-08 15:42:21 +0100 |
commit | c74f8bccc71a60b69115bc3a54f68daab139de9b (patch) | |
tree | ac83369f6eb59e772434bdbba35abd5b61bcc881 /colorize.c | |
parent | 5b543402df3ecb2e5c5cb973ee4951d22f9cd52c (diff) | |
download | colorize-c74f8bccc71a60b69115bc3a54f68daab139de9b.tar.gz colorize-c74f8bccc71a60b69115bc3a54f68daab139de9b.tar.bz2 |
Skip invalid sequences correctly
Diffstat (limited to 'colorize.c')
-rw-r--r-- | colorize.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -752,7 +752,7 @@ print_clean (const char *line) char ***offsets = NULL; unsigned int count = 0, i = 0; - for (p = line; *p; p++) + for (p = line; *p;) { /* ESC[ */ if (*p == 27 && *(p + 1) == '[') @@ -810,6 +810,7 @@ print_clean (const char *line) DISCARD: continue; } + p++; } if (offsets) |