1
0
mirror of https://github.com/irssi/irssi.git synced 2025-02-02 15:08:01 -05:00
This commit is contained in:
ailin-nemui 2016-12-20 16:41:57 +01:00
parent 1c6695107c
commit 7dc2f832c1

View File

@ -68,7 +68,7 @@ static void format_expand_code(const char **format, GString *out, int *flags)
if (flags == NULL) {
/* flags are being ignored - skip the code */
while (**format != ']')
while (**format != ']' && **format != '\0')
(*format)++;
return;
}
@ -246,6 +246,10 @@ int format_expand_styles(GString *out, const char **format, int *flags)
case '[':
/* code */
format_expand_code(format, out, flags);
if ((*format)[0] == '\0')
/* oops, reached end prematurely */
(*format)--;
break;
case 'x':
case 'X':