From 83c57a9d98166e85932c76fbceeda28fe92b3e9a Mon Sep 17 00:00:00 2001 From: Heng Li Date: Fri, 23 Feb 2018 17:27:41 -0500 Subject: [PATCH] r719: fixed bad memory access --- align.c | 2 +- main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/align.c b/align.c index e7fecc3..b56bde2 100644 --- a/align.c +++ b/align.c @@ -46,7 +46,7 @@ static inline void update_max_zdrop(int32_t score, int i, int j, int32_t *max, i static int mm_test_zdrop(void *km, const mm_mapopt_t *opt, const uint8_t *qseq, const uint8_t *tseq, uint32_t n_cigar, uint32_t *cigar, const int8_t *mat) { uint32_t k; - int32_t score = 0, max = 0, max_i = -1, max_j = -1, i = 0, j = 0, max_zdrop = 0; + int32_t score = 0, max = INT32_MIN, max_i = -1, max_j = -1, i = 0, j = 0, max_zdrop = 0; int pos[2][2] = {{-1, -1}, {-1, -1}}, q_len, t_len; // find the score and the region where score drops most along diagonal diff --git a/main.c b/main.c index cbbcb0c..00a8948 100644 --- a/main.c +++ b/main.c @@ -6,7 +6,7 @@ #include "mmpriv.h" #include "getopt.h" -#define MM_VERSION "2.8-r718-dirty" +#define MM_VERSION "2.8-r719-dirty" #ifdef __linux__ #include