From: H.G.Muller Date: Tue, 16 Sep 2014 17:04:19 +0000 (+0200) Subject: Ignore color arguments not starting with # X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=1b6d162e8339edb02dc76c6712d9d7a8804b2748;p=xboard.git Ignore color arguments not starting with # Old settings files from xpm-using version might still contain color designations like 'white' or 'red'. Since Cairo would interpret these as black, it is better to ignore them, so the default color is used. --- diff --git a/gtk/xboard.c b/gtk/xboard.c index 895e10f..4daec27 100644 --- a/gtk/xboard.c +++ b/gtk/xboard.c @@ -447,7 +447,7 @@ CreateFonts () void ParseColor (int n, char *name) { // in XBoard, just copy the color-name string - if(colorVariable[n]) *(char**)colorVariable[n] = strdup(name); + if(colorVariable[n] && *name == '#') *(char**)colorVariable[n] = strdup(name); } char * diff --git a/xaw/xboard.c b/xaw/xboard.c index 86d4283..b9fb0e1 100644 --- a/xaw/xboard.c +++ b/xaw/xboard.c @@ -536,7 +536,7 @@ CreateFonts () void ParseColor (int n, char *name) { // in XBoard, just copy the color-name string - if(colorVariable[n]) *(char**)colorVariable[n] = strdup(name); + if(colorVariable[n] && *name == '#') *(char**)colorVariable[n] = strdup(name); } char *