From e87981737301bbcfeef68d9b164f8f28ea8ac574 Mon Sep 17 00:00:00 2001 From: Heng Li Date: Thu, 20 Feb 2014 13:06:40 -0500 Subject: [PATCH] r440: a condition not work due to a typo --- bwa.c | 2 +- main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bwa.c b/bwa.c index f1d4649..140d57e 100644 --- a/bwa.c +++ b/bwa.c @@ -143,7 +143,7 @@ uint32_t *bwa_gen_cigar(const int8_t mat[25], int q, int r, int w_, int64_t l_pa } x += len; y += len; } else if (op == 2) { // deletion - if (k > 0 && k < *n_cigar) { // don't do the following if D is the first or the last CIGAR + if (k > 0 && k < *n_cigar - 1) { // don't do the following if D is the first or the last CIGAR kputw(u, &str); kputc('^', &str); for (i = 0; i < len; ++i) kputc(int2base[rseq[y+i]], &str); diff --git a/main.c b/main.c index c264abe..803cf10 100644 --- a/main.c +++ b/main.c @@ -4,7 +4,7 @@ #include "utils.h" #ifndef PACKAGE_VERSION -#define PACKAGE_VERSION "0.7.6a+dev-r439" +#define PACKAGE_VERSION "0.7.6a+dev-r440" #endif int bwa_fa2pac(int argc, char *argv[]);