diff --git a/ksw2_extd2_sse.c b/ksw2_extd2_sse.c index c638738..3130eec 100644 --- a/ksw2_extd2_sse.c +++ b/ksw2_extd2_sse.c @@ -50,7 +50,7 @@ void ksw_extd2_sse(void *km, int qlen, const uint8_t *query, int tlen, const uin __m128i *u, *v, *x, *y, *x2, *y2, *s, *p = 0; ksw_reset_extz(ez); - if (m <= 1 || qlen <= 0 || tlen <= 0 || w < 0) return; + if (m <= 1 || qlen <= 0 || tlen <= 0) return; if (q2 + e2 < q + e) t = q, q = q2, q2 = t, t = e, e = e2, e2 = t; // make sure q+e no larger than q2+e2 @@ -63,6 +63,7 @@ void ksw_extd2_sse(void *km, int qlen, const uint8_t *query, int tlen, const uin sc_mis_ = _mm_set1_epi8(mat[1]); m1_ = _mm_set1_epi8(m - 1); // wildcard + if (w < 0) w = tlen > qlen? tlen : qlen; wl = wr = w; tlen_ = (tlen + 15) / 16; n_col_ = ((w + 1 < tlen? (w + 1 < qlen? w + 1 : qlen): tlen) + 15) / 16 + 1; diff --git a/ksw2_extz2_sse.c b/ksw2_extz2_sse.c index 16f4fcd..f728619 100644 --- a/ksw2_extz2_sse.c +++ b/ksw2_extz2_sse.c @@ -41,7 +41,7 @@ void ksw_extz2_sse(void *km, int qlen, const uint8_t *query, int tlen, const uin __m128i *u, *v, *x, *y, *s, *p = 0; ksw_reset_extz(ez); - if (m <= 0 || qlen <= 0 || tlen <= 0 || w < 0) return; + if (m <= 0 || qlen <= 0 || tlen <= 0) return; zero_ = _mm_set1_epi8(0); q_ = _mm_set1_epi8(q); @@ -55,6 +55,7 @@ void ksw_extz2_sse(void *km, int qlen, const uint8_t *query, int tlen, const uin m1_ = _mm_set1_epi8(m - 1); // wildcard max_sc_ = _mm_set1_epi8(mat[0] + (q + e) * 2); + if (w < 0) w = tlen > qlen? tlen : qlen; wl = wr = w; tlen_ = (tlen + 15) / 16; n_col_ = ((w + 1 < tlen? (w + 1 < qlen? w + 1 : qlen): tlen) + 15) / 16 + 1; diff --git a/main.c b/main.c index c554bd9..16d5d58 100644 --- a/main.c +++ b/main.c @@ -10,7 +10,7 @@ #include "minimap.h" #include "mmpriv.h" -#define MM_VERSION "2.0-r188-dirty" +#define MM_VERSION "2.0-r189-dirty" void liftrlimit() {