From 3f0743e749e1b0bce6f7a7deb304643367f90252 Mon Sep 17 00:00:00 2001 From: Emanuele Giaquinta Date: Mon, 24 Nov 2008 23:22:44 +0000 Subject: [PATCH] Do not strip the comma in a mirc color if it is not followed by a digit, bug #250. git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4920 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-common/core/formats.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)) {