82ded93d66a822e83a7b957ffa603304dcaa51cb
braney
  Wed Jan 3 11:19:32 2018 -0800
fix problem with custom track altColor as described in #20741

diff --git src/hg/lib/customTrack.c src/hg/lib/customTrack.c
index 8e94132..a59ef8c 100644
--- src/hg/lib/customTrack.c
+++ src/hg/lib/customTrack.c
@@ -503,31 +503,31 @@
     fprintf(f, "\t%s='%s'", "url", tdb->url);
 hashMayRemove(tdb->settingsHash, "url");
 if (tdb->visibility != def->visibility)
     fprintf(f, "\t%s='%d'", "visibility", tdb->visibility);
 hashMayRemove(tdb->settingsHash, "visibility");
 if (tdb->useScore != def->useScore)
     fprintf(f, "\t%s='%d'", "useScore", tdb->useScore);
 hashMayRemove(tdb->settingsHash, "useScore");
 if (tdb->priority != def->priority)
     fprintf(f, "\t%s='%.3f'", "priority", tdb->priority);
 hashMayRemove(tdb->settingsHash, "priority");
 if (tdb->colorR != def->colorR || tdb->colorG != def->colorG || tdb->colorB != def->colorB)
     fprintf(f, "\t%s='%d,%d,%d'", "color", tdb->colorR, tdb->colorG, tdb->colorB);
 hashMayRemove(tdb->settingsHash, "color");
 if (tdb->altColorR != def->altColorR || tdb->altColorG != def->altColorG
-	|| tdb->altColorB != tdb->altColorB)
+	|| tdb->altColorB != def->altColorB)
     fprintf(f, "\t%s='%d,%d,%d'", "altColor", tdb->altColorR, tdb->altColorG, tdb->altColorB);
 hashMayRemove(tdb->settingsHash, "altColor");
 
 if (tdb->settings && (strlen(tdb->settings) > 0))
     saveSettings(f, hashToRaString(tdb->settingsHash));
 fputc('\n', f);
 fflush(f);
 if (ferror(f))
     errnoAbort("Write error to %s", fileName);
 trackDbFree(&def);
 }
 
 void customTracksSaveFile(char *genomeDb, struct customTrack *trackList, char *fileName)
 /* Save out custom tracks. This is just used internally
  * and by testing programs */