diff options
Diffstat (limited to 'logger.c')
-rwxr-xr-x | logger.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -606,16 +606,15 @@ void close_logger(void) static void strip_coloring(char *str) { - char *src = str, *dest, *end; + char *src, *dest, *end; if (!src) return; /* find the first potential escape sequence in the string */ - while (*src && (*src != '\033')) - src++; - if (!*src) + src = strchr(str, '\033'); + if (!src) return; dest = src; |