]> git.kaiwu.me - klib.git/commitdiff
bugfix: wrong score for KSW_XBYTE
authorHeng Li <lh3@me.com>
Fri, 2 Mar 2012 23:14:51 +0000 (18:14 -0500)
committerHeng Li <lh3@me.com>
Fri, 2 Mar 2012 23:14:51 +0000 (18:14 -0500)
ksw.c

diff --git a/ksw.c b/ksw.c
index 400a81f45f0976a1fc695ef09f3c9bb9b81f9044..3f0fea8b94432338e7dcc65aa2ca53584b7ce611 100644 (file)
--- a/ksw.c
+++ b/ksw.c
@@ -198,7 +198,7 @@ end_loop16:
                }
                S = H1; H1 = H0; H0 = S; // swap H0 and H1
        }
-       r.score = gmax + q->shift < 255? gmax + q->shift : 255;
+       r.score = gmax + q->shift < 255? gmax : 255;
        r.te = te;
        if (r.score != 255) { // get a->qe, the end of query match; find the 2nd best score
                int max = -1, low, high, qlen = slen * 16;