c7fe19c878fc68ef50674bbaa95a117499c27f56
jcasper
  Wed Jul 24 22:57:53 2019 -0700
Fixing bad loop limit, which resulted in using a NULL pointer. refs #23853

diff --git src/hg/hgTables/hic.c src/hg/hgTables/hic.c
index 290444d..153dc20 100644
--- src/hg/hgTables/hic.c
+++ src/hg/hgTables/hic.c
@@ -234,31 +234,31 @@
     warn("%s", errMsg);
     }
 else
     {
     int res = hicUiFetchResolutionAsInt(cart, table, fileInfo, region->end-region->start);
     char *norm = hicUiFetchNormalization(cart, table, fileInfo);
 
     struct interact *results = NULL, *result = NULL;
     errMsg = hicLoadData(fileInfo, res, norm, region->chrom, region->start, region->end,
             region->chrom, region->start, region->end, &results);
     if (errMsg != NULL)
         warn("%s", errMsg);
     slSort(&results, &hicCompare);
     char *row[INTERACT_NUM_COLS];
     char numBuf[HIC_NUM_BUF_SIZE];
-    for (result=results; results != NULL; result = result->next)
+    for (result=results; result != NULL; result = result->next)
         {
         hicRecordToRow(result, numBuf, row);
         if (asFilterOnRow(filter, row))
             {
             struct bed *bed;
             lmAllocVar(bedLm, bed);
             bed->chrom = lmCloneString(bedLm, result->chrom);
             bed->chromStart = result->chromStart;
             bed->chromEnd = result->chromEnd;
             bed->name = NULL;
             slAddHead(pBedList, bed);
             }
         (*pMaxOut)--;
         if (*pMaxOut <= 0)
             break;