mirror of
https://github.com/irssi/irssi.git
synced 2024-09-01 04:14:16 -04:00
strip_codes() didn't handle ANSI colors properly, and if used at the end of
line it might have crashed irssi (especially with topics). yeah, remote crash. great. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2856 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
8856d9fc3d
commit
b9b0917897
@ -907,9 +907,8 @@ char *strip_codes(const char *input)
|
|||||||
if (*p == 27 && p[1] != '\0') {
|
if (*p == 27 && p[1] != '\0') {
|
||||||
p++;
|
p++;
|
||||||
p = get_ansi_color(current_theme, p, NULL, NULL, NULL);
|
p = get_ansi_color(current_theme, p, NULL, NULL, NULL);
|
||||||
}
|
p--;
|
||||||
|
} else if (!IS_COLOR_CODE(*p))
|
||||||
if (!IS_COLOR_CODE(*p))
|
|
||||||
*out++ = *p;
|
*out++ = *p;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user