From 11d62f0d7d3072e568f91bcf2f97a0ebdf4b67ba Mon Sep 17 00:00:00 2001 From: William McBrine Date: Thu, 12 Oct 2006 11:04:56 +0000 Subject: [PATCH] COLORS is not reset before the fork, so use MAX_COLORS instead. --- x11/x11.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/x11/x11.c b/x11/x11.c index b867eb55..8451f7b0 100644 --- a/x11/x11.c +++ b/x11/x11.c @@ -32,7 +32,7 @@ #include #include -RCSID("$Id: x11.c,v 1.25 2006/10/12 02:24:19 wmcbrine Exp $"); +RCSID("$Id: x11.c,v 1.26 2006/10/12 11:04:56 wmcbrine Exp $"); #ifndef XPOINTER_TYPEDEFED typedef char * XPointer; @@ -2671,7 +2671,7 @@ static void GetColor(void) Colormap cmap = DefaultColormap(XCURSESDISPLAY, DefaultScreen(XCURSESDISPLAY)); - if (index < 0 || index >= COLORS * 2) + if (index < 0 || index >= MAX_COLORS) ExitProcess(4, SIGKILL, "exiting from GetColor"); tmp->pixel = colors[index]; @@ -2685,7 +2685,7 @@ static void SetColor(void) Colormap cmap = DefaultColormap(XCURSESDISPLAY, DefaultScreen(XCURSESDISPLAY)); - if (index < 0 || index >= COLORS * 2) + if (index < 0 || index >= MAX_COLORS) ExitProcess(4, SIGKILL, "exiting from SetColor"); if (XAllocColor(XCURSESDISPLAY, cmap, tmp))