fixed a segfault when there are too few good bases.
This commit is contained in:
parent
c8edcafb44
commit
8f89f55484
1
bntseq.c
1
bntseq.c
|
|
@ -29,6 +29,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <zlib.h>
|
||||
#include <unistd.h>
|
||||
#include "bntseq.h"
|
||||
#include "main.h"
|
||||
#include "utils.h"
|
||||
|
|
|
|||
|
|
@ -574,7 +574,7 @@ static void bsw2_aln_core(bsw2seq_t *_seq, const bsw2opt_t *_opt, const bntseq_t
|
|||
rseq[1][i] = c;
|
||||
}
|
||||
if (l - k < opt.t) { // too few unambiguous bases
|
||||
buf[x] = 0;
|
||||
buf[x] = calloc(1, sizeof(bwtsw2_t));
|
||||
free(seq[0]); continue;
|
||||
}
|
||||
// alignment
|
||||
|
|
|
|||
Loading…
Reference in New Issue