diff --git a/src/align.c b/src/align.c index 5fe73ff..4724f62 100644 --- a/src/align.c +++ b/src/align.c @@ -739,6 +739,13 @@ static void mm_align1(void *km, const mm_mapopt_t *opt, const mm_idx_t *mi, int if (ez->n_cigar > 0) mm_append_cigar(r, ez->n_cigar, ez->cigar); if (ez->zdropped) { // truncated by Z-drop; TODO: sometimes Z-drop kicks in because the next seed placement is wrong. This can be fixed in principle. + if (!r->p) { + assert(ez->n_cigar == 0); + uint32_t capacity = sizeof(mm_extra_t)/4; + kroundup32(capacity); + r->p = (mm_extra_t*)calloc(capacity, 4); + r->p->capacity = capacity; + } for (j = i - 1; j >= 0; --j) if ((int32_t)a[as1 + j].x <= rs + ez->max_t) break;