03e01bc588d0e171fdb2487dc036e8c481aad4e8 braney Wed Mar 30 16:47:50 2022 -0700 fix bug I introduced last year that breaks ByRange and Min and Max with bigBed filters. diff --git src/hg/lib/hui.c src/hg/lib/hui.c index 3af063c..91be8d4 100644 --- src/hg/lib/hui.c +++ src/hg/lib/hui.c @@ -6147,33 +6147,36 @@ return NULL; struct hashEl *hel = hashLookup(tdb->isNewFilterHash, name); if (hel == NULL) return NULL; return hel->val; } char *getScoreNameAdd(struct trackDb *tdb, char *scoreName, char *add) // Add a suffix to a filter for more information { char scoreLimitName[1024]; char *name = cloneString(scoreName); -if (isNewFilterType(tdb, scoreName) != NULL) - { char *dot = strchr(name, '.'); +if (dot == NULL) + return name; + +if (isNewFilterType(tdb, dot+1) != NULL) + { *dot++ = 0; safef(scoreLimitName, sizeof(scoreLimitName), "%s%s.%s", name, add, dot); } else safef(scoreLimitName, sizeof(scoreLimitName), "%s%s", scoreName, add); return cloneString(scoreLimitName); } static boolean getScoreLimitsFromTdb(struct trackDb *tdb, char *scoreName,char *defaults, char**min,char**max) // returns TRUE if limits exist and sets the string pointer (because they may be float or int) // if min or max are set, then they should be freed { if (min) *min = NULL; // default these outs!