dcb42ca54277d403ea36613201459567ddee8d88
jcasper
  Wed Mar 8 19:24:51 2023 -0800
Fixing a couple of overzealous interpretations of bedParseRgb failing, refs #30569

diff --git src/hg/lib/customFactory.c src/hg/lib/customFactory.c
index 91ac97d..69c1d38 100644
--- src/hg/lib/customFactory.c
+++ src/hg/lib/customFactory.c
@@ -528,31 +528,31 @@
         lineFileAbort(lf,
 	     "thickEnd out of range for %s:%d-%d, thick:%d-%d (chromStart to chromEnd, or 0 if no CDS)",
 		       bed->name, bed->chromStart, bed->chromEnd,
 		       bed->thickStart, bed->thickEnd);
      }
 else
      bed->thickEnd = bed->chromEnd;
 if (wordCount > 8)
     {
     char *comma;
     /*	Allow comma separated list of rgb values here	*/
     comma = strchr(row[8], ',');
     if (comma)
 	{
 	int rgb = bedParseRgb(row[8]);
-	if (rgb < 0)
+	if (rgb == -1)
 	    lineFileAbort(lf,
 	        "Expecting 3 comma separated numbers for r,g,b bed item color.");
 	else
 	    bed->itemRgb = rgb;
 	}
     else
 	bed->itemRgb = lineFileNeedNum(lf, row, 8);
     }
 if (wordCount > 9)
     bed->blockCount = lineFileNeedNum(lf, row, 9);
 if (wordCount > 10)
     {
     sqlSignedDynamicArray(row[10], &bed->blockSizes, &count);
     if (count != bed->blockCount)
 	lineFileAbort(lf,  "expecting %d elements in array", bed->blockCount);