9c6125af478c45e473f71b74f969a047d7ae81f5
braney
  Thu May 8 15:04:26 2014 -0700
fix crashing bug in snakes introduced long ago, but given a new killinglicense by recent changes to compact snakes.

diff --git src/hg/hgTracks/snakeTrack.c src/hg/hgTracks/snakeTrack.c
index 58844c3..1ab164d 100644
--- src/hg/hgTracks/snakeTrack.c
+++ src/hg/hgTracks/snakeTrack.c
@@ -454,31 +454,31 @@
 	    if (prev != NULL)
 		Levels[prev->level].hasBlock = TRUE;
 
 	    }
 	}
 
     // now figure out how to remap the blocks
     int ii;
     int count = 0;
     for(ii=0; ii < oldMax + 1; ii++)
 	{
 	Levels[ii].adjustLevel = count;
 	if ((Levels[ii].init) && (Levels[ii].hasBlock))
 	    count++;
 	}
-    maxLevel = count - 1;
+    maxLevel = count;
 
     // remap blocks
     for(sf=(struct snakeFeature *)lf->components; sf; sf = sf->next)
 	sf->level = Levels[sf->level].adjustLevel;
 
     // now compact the snakes
     lf->components = (void *)compactSnakes((struct snakeFeature *)lf->components);
     struct snakeInfo *si;
     AllocVar(si);
     si->maxLevel = maxLevel;
     lf->codons = (struct simpleFeature *)si;
     }
 }
 
 static void calcPackSnakeHelper(struct snakeFeature *list, int level)