Imported Upstream version 0.6
[pysam.git] / samtools / kprobaln.c.pysam.c
index b87dcf07c831dc946900028fc1a2b3a073b404b5..3404936c70689012234e956e754844f1b5d0618e 100644 (file)
@@ -163,7 +163,7 @@ int kpa_glocal(const uint8_t *_ref, int l_ref, const uint8_t *_query, int l_quer
                double p = 1., Pr1 = 0.;
                for (i = 0; i <= l_query + 1; ++i) {
                        p *= s[i];
-                       if (p < 1e-100) Pr += -4.343 * log(p), p = 1.;
+                       if (p < 1e-100) Pr1 += -4.343 * log(p), p = 1.;
                }
                Pr1 += -4.343 * log(p * l_ref * l_query);
                Pr = (int)(Pr1 + .499);