From 827ca4b4612bbf2a9d786566f3dbc98f249648b1 Mon Sep 17 00:00:00 2001 From: Heng Li Date: Wed, 7 Apr 2021 23:31:31 -0400 Subject: [PATCH] r1012: fixed an off-by-one bug; resolves #489 --- align.c | 4 ++-- main.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/align.c b/align.c index 7bfb254..6028abb 100644 --- a/align.c +++ b/align.c @@ -38,8 +38,8 @@ static inline void update_max_zdrop(int32_t score, int i, int j, int32_t *max, i int z = *max - score - diff * e; if (z > *max_zdrop) { *max_zdrop = z; - pos[0][0] = *max_i, pos[0][1] = i + 1; - pos[1][0] = *max_j, pos[1][1] = j + 1; + pos[0][0] = *max_i, pos[0][1] = i; + pos[1][0] = *max_j, pos[1][1] = j; } } else *max = score, *max_i = i, *max_j = j; } diff --git a/main.c b/main.c index 2af0799..c727d70 100644 --- a/main.c +++ b/main.c @@ -7,7 +7,7 @@ #include "mmpriv.h" #include "ketopt.h" -#define MM_VERSION "2.17-r1009-dirty" +#define MM_VERSION "2.17-r1012-dirty" #ifdef __linux__ #include