From fb0e96b4ceae3d34b2eb8163aa328950d2510db1 Mon Sep 17 00:00:00 2001 From: Thomas Roessler Date: Tue, 16 Jun 1998 15:02:09 +0000 Subject: Fix the "unknown color" bug reported by Vikas. --- color.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'color.c') diff --git a/color.c b/color.c index 6468b2e3..66bcd8b3 100644 --- a/color.c +++ b/color.c @@ -347,7 +347,8 @@ parse_color_name (const char *s, int *col, int *attr, int brite, BUFFER *err) { s += 5; *col = strtol (s, &eptr, 10); - if (!*s || *eptr || *col < 0 || *col >= COLORS) + if (!*s || *eptr || *col < 0 || + (*col >= COLORS && !option(OPTNOCURSES) && has_colors())) { snprintf (err->data, err->dsize, "%s: color not supported by term", s); return (-1); -- cgit v1.2.3