src/hg/hgc/hgc.c 1.1572

1.1572 2009/09/21 23:50:42 braney
fix memory trashing bug that's been here for ages. Thanks Brooke!
Index: src/hg/hgc/hgc.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/hgc/hgc.c,v
retrieving revision 1.1571
retrieving revision 1.1572
diff -b -B -U 4 -r1.1571 -r1.1572
--- src/hg/hgc/hgc.c	9 Sep 2009 17:02:01 -0000	1.1571
+++ src/hg/hgc/hgc.c	21 Sep 2009 23:50:42 -0000	1.1572
@@ -4110,9 +4110,8 @@
 boolean hasBin;
 char *buffer, *str;
 int i, j;
 char *ptr;
-int totalSize = 0;
 
 start = cartInt(cart, "o");
 hFindSplitTable(database, seqName, table, fullTable, &hasBin);
 sprintf(query, "select * from %s where qName = '%s' and tName = '%s' and tStart=%d",
@@ -4137,12 +4136,10 @@
     {
     start = psl->tSize - end;
     reverseComplement(tSeq->dna, tSeq->size);
     }
-for (i=0; i<psl->blockCount; ++i)
-    totalSize += psl->blockSizes[i];
 
-str = buffer = needMem(totalSize + 1);
+str = buffer = needMem(psl->qSize + 1);
 
 qStart = 0;
 for (i=0; i<psl->blockCount; ++i)
     {