]> git.donarmstrong.com Git - samtools.git/commitdiff
fixed a silly bug in pileup
authorHeng Li <lh3@live.co.uk>
Wed, 27 Oct 2010 23:58:54 +0000 (23:58 +0000)
committerHeng Li <lh3@live.co.uk>
Wed, 27 Oct 2010 23:58:54 +0000 (23:58 +0000)
bam_plcmd.c

index 23602ccd5bcf6dc116632fa1bdb9483993aebf92..dca85181f99bf1c7343650846039153a019e7ea9 100644 (file)
@@ -473,6 +473,7 @@ int bam_pileup(int argc, char *argv[])
                        bam_plp_set_mask(iter, d->mask);
                        while ((ret = samread(fp, b)) >= 0) {
                                int skip = 0;
+                               if ((int)b->core.tid < 0) break;
                                // update d->ref if necessary
                                if (d->fai && (int)b->core.tid != d->tid) {
                                        free(d->ref);