r1012: fixed an off-by-one bug; resolves #489

This commit is contained in:
Heng Li 2021-04-07 23:31:31 -04:00
parent d3dde2fdd4
commit 827ca4b461
2 changed files with 3 additions and 3 deletions

View File

@ -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;
}

2
main.c
View File

@ -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 <sys/resource.h>