mirror of
https://github.com/irssi/irssi.git
synced 2026-08-08 19:30:15 +02:00
Update formats.c
remove now useless check for ,
This commit is contained in:
parent
3acc72f842
commit
47400d405a
1 changed files with 11 additions and 12 deletions
|
|
@ -1078,23 +1078,22 @@ static void get_mirc_color(const char **str, int *fg_ret, int *bg_ret)
|
|||
bg = -1;
|
||||
} else {
|
||||
/* foreground color */
|
||||
if (**str != ',') {
|
||||
fg = **str-'0';
|
||||
fg = **str-'0';
|
||||
(*str)++;
|
||||
if (i_isdigit(**str)) {
|
||||
fg = fg*10 + (**str-'0');
|
||||
(*str)++;
|
||||
if (i_isdigit(**str)) {
|
||||
fg = fg*10 + (**str-'0');
|
||||
(*str)++;
|
||||
}
|
||||
}
|
||||
|
||||
if ((*str)[0] == ',' && i_isdigit((*str)[1])) {
|
||||
/* background color */
|
||||
(*str)++;
|
||||
bg = **str-'0';
|
||||
(*str)++;
|
||||
if (i_isdigit(**str)) {
|
||||
bg = bg*10 + (**str-'0');
|
||||
(*str)++;
|
||||
bg = **str-'0';
|
||||
(*str)++;
|
||||
if (i_isdigit(**str)) {
|
||||
bg = bg*10 + (**str-'0');
|
||||
(*str)++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue