1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

buffer overflow fix

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1647 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-07-25 19:16:21 +00:00 committed by cras
parent fc4f81c751
commit f81291622f

View File

@ -413,9 +413,9 @@ static char *theme_format_compress_colors(THEME_REC *theme, const char *format)
if (IS_OLD_FORMAT(*format, last_fg, last_bg)) {
/* active color set again */
} else if (IS_FGCOLOR_FORMAT(*format) &&
(*format != 'n' || format[2] == 'n') &&
format[1] == '%' &&
IS_FGCOLOR_FORMAT(format[2])) {
IS_FGCOLOR_FORMAT(format[2]) &&
(*format != 'n' || format[2] == 'n')) {
/* two fg colors in a row. bg colors are
so rare that we don't bother checking
them */