diff --git a/src/fe-common/core/formats.c b/src/fe-common/core/formats.c index 4830090a..248b9d20 100644 --- a/src/fe-common/core/formats.c +++ b/src/fe-common/core/formats.c @@ -828,10 +828,10 @@ static void get_mirc_color(const char **str, int *fg_ret, int *bg_ret) } if (**str == ',') { /* background color */ - (*str)++; - if (!i_isdigit(**str)) + if (!i_isdigit(*str[1])) bg = -1; else { + (*str)++; bg = **str-'0'; (*str)++; if (i_isdigit(**str)) {