From a9f25d125bb661656fee5f6fcabc4153078ed72a Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Mon, 20 Dec 2010 18:24:29 +0100 Subject: Do not allow empty string for color (regression with 256 colors feature) --- src/gui/curses/gui-curses-color.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.3