r414: avoid assertion failure for 0-length reads

This commit is contained in:
Heng Li 2017-09-19 22:21:27 -04:00
parent 11081c6c27
commit b99c22840f
2 changed files with 4 additions and 1 deletions

2
main.c
View File

@ -6,7 +6,7 @@
#include "mmpriv.h"
#include "getopt.h"
#define MM_VERSION "2.2-r411-dirty"
#define MM_VERSION "2.2-r414-dirty"
#ifdef __linux__
#include <sys/resource.h>

3
map.c
View File

@ -162,6 +162,9 @@ mm_reg1_t *mm_map(const mm_idx_t *mi, int qlen, const char *seq, int *n_regs, mm
mm128_t *a;
mm_reg1_t *regs;
*n_regs = 0;
if (qlen == 0) return 0;
// collect minimizers
b->mini.n = 0;
mm_sketch(b->km, seq, qlen, mi->w, mi->k, 0, mi->is_hpc, &b->mini);