Initialize r->p if ez->zdropped
This commit is contained in:
parent
ccb0f7b05d
commit
c9874e2dc5
7
align.c
7
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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue