1
0
mirror of https://github.com/irssi/irssi.git synced 2024-11-03 04:27:19 -05:00

Update formats.c

remove now useless check for ,
This commit is contained in:
ailin-nemui 2017-11-20 14:17:15 +01:00 committed by GitHub
parent 3acc72f842
commit 47400d405a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1078,23 +1078,22 @@ static void get_mirc_color(const char **str, int *fg_ret, int *bg_ret)
bg = -1; bg = -1;
} else { } else {
/* foreground color */ /* foreground color */
if (**str != ',') { fg = **str-'0';
fg = **str-'0'; (*str)++;
if (i_isdigit(**str)) {
fg = fg*10 + (**str-'0');
(*str)++; (*str)++;
if (i_isdigit(**str)) {
fg = fg*10 + (**str-'0');
(*str)++;
}
} }
if ((*str)[0] == ',' && i_isdigit((*str)[1])) { if ((*str)[0] == ',' && i_isdigit((*str)[1])) {
/* background color */ /* background color */
(*str)++;
bg = **str-'0';
(*str)++;
if (i_isdigit(**str)) {
bg = bg*10 + (**str-'0');
(*str)++; (*str)++;
bg = **str-'0'; }
(*str)++;
if (i_isdigit(**str)) {
bg = bg*10 + (**str-'0');
(*str)++;
}
} }
} }