mirror of
https://github.com/weechat/weechat.git
synced 2026-06-12 14:14:48 +02:00
Do not allow empty string for color (regression with 256 colors feature)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user