diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2010-12-20 18:24:29 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2010-12-20 18:24:29 +0100 |
commit | a9f25d125bb661656fee5f6fcabc4153078ed72a (patch) | |
tree | 65899d29da3c3f00a011d24aa9824c81c74a502e /src | |
parent | 8893a590631491766615f705057f4fd3ede5cfab (diff) | |
download | weechat-a9f25d125bb661656fee5f6fcabc4153078ed72a.zip |
Do not allow empty string for color (regression with 256 colors feature)
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/curses/gui-curses-color.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/curses/gui-curses-color.c b/src/gui/curses/gui-curses-color.c index cc08c02ac..ace7faf40 100644 --- a/src/gui/curses/gui-curses-color.c +++ b/src/gui/curses/gui-curses-color.c @@ -107,7 +107,7 @@ gui_color_assign (int *color, const char *color_name) /* is it pair number? */ error = NULL; pair = (int)strtol (color_name, &error, 10); - if (error && !error[0] && (pair >= 0)) + if (color_name[0] && error && !error[0] && (pair >= 0)) { /* color_name is a number, use this pair number */ *color = GUI_COLOR_PAIR_FLAG | pair; |