From 7d1af7271b7ccdd1017f3fc70f9d8c436a612af5 Mon Sep 17 00:00:00 2001 From: erg Date: Thu, 17 Feb 2005 15:36:01 +0000 Subject: [PATCH] Fix bug on sgis and suns: bsearch requires a non-NULL array pointer. --- lib/gvc/gvrender.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/gvc/gvrender.c b/lib/gvc/gvrender.c index cbc95d025..8d8a3b1f5 100644 --- a/lib/gvc/gvrender.c +++ b/lib/gvc/gvrender.c @@ -246,7 +246,7 @@ static void gvrender_resolve_color(gvrender_features_t * features, color->u.string = name; color->type = COLOR_STRING; tok = canontoken(name); - if ((bsearch(&tok, features->knowncolors, features->sz_knowncolors, + if (!features->knowncolors || (bsearch(&tok, features->knowncolors, features->sz_knowncolors, sizeof(char *), gvrender_comparestr)) == NULL) { /* if tok was not found in known_colors */ colorxlate(name, color, features->color_type); -- 2.40.0