17c3457c1ceec90005de6ff399c50a9c66c8ce50
braney
  Mon Oct 18 13:43:01 2021 -0700
fixed silly oversight that failed to correct for zero width items

diff --git src/hg/lib/liftOver.c src/hg/lib/liftOver.c
index 1c7ba61..2e62f4b 100644
--- src/hg/lib/liftOver.c
+++ src/hg/lib/liftOver.c
@@ -226,31 +226,35 @@
     return "Duplicated in new";
     }
 /* sort chains by position in target to order subregions by orthology */
 slSort(&chainsHit, chainCmpTarget);
 
 tStart = s;
 struct chain *next = chainsHit->next;
 for (chain = chainsHit; chain != NULL; chain = next)
     {
     struct chain *subChain = NULL;
     struct chain *toFree = NULL;
     int start=s, end=e;
     boolean expanded = FALSE;
     
     // see above.  Add fudge factor and remember that we did so.
-    if (start == end) end++;
+    if (start == end)
+        {
+        expanded = TRUE;
+        end++;
+        }
 
     next = chain->next;
     verbose(3,"hit chain %s:%d %s:%d-%d %c (%d)\n",
         chain->tName, chain->tStart,  chain->qName, chain->qStart, chain->qEnd,
         chain->qStrand, chain->id);
     if (multiple)
         {
         /* no real need to verify ratio again (it would require
          * adjusting coords again). */
         minRatio = 0;
         if (db)
             {
             /* use full chain, not the possibly truncated chain
              * from the net */
             struct chain *next = chain->next;