1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05: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:
Timo Sirainen 2002-06-19 03:06:05 +00:00 committed by cras
parent 8856d9fc3d
commit b9b0917897

View File

@ -907,9 +907,8 @@ char *strip_codes(const char *input)
if (*p == 27 && p[1] != '\0') {
p++;
p = get_ansi_color(current_theme, p, NULL, NULL, NULL);
}
if (!IS_COLOR_CODE(*p))
p--;
} else if (!IS_COLOR_CODE(*p))
*out++ = *p;
}