]> git.donarmstrong.com Git - samtools.git/blobdiff - bam2bcf.c
* fixed an out-of-boundary bug
[samtools.git] / bam2bcf.c
index 46f534ee7553182f790384921c8c667417838b75..98acb5dd2ff051eacb86f8efd72c00c370798617 100644 (file)
--- a/bam2bcf.c
+++ b/bam2bcf.c
@@ -79,7 +79,7 @@ int bcf_call_glfgen(int _n, const bam_pileup1_t *pl, int ref_base, bcf_callaux_t
                }
                bca->bases[n++] = q<<5 | (int)bam1_strand(p->b)<<4 | b;
                // collect annotations
-               r->qsum[b] += q;
+               if (b < 4) r->qsum[b] += q;
                ++r->anno[0<<2|is_diff<<1|bam1_strand(p->b)];
                min_dist = p->b->core.l_qseq - 1 - p->qpos;
                if (min_dist > p->qpos) min_dist = p->qpos;