Skip to content

Commit 2da649d

Browse files
committedNov 15, 2020
Merge remote-tracking branch 'origin/master'
2 parents f995f55 + c9874e2 commit 2da649d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed
 

‎align.c

+7
Original file line numberDiff line numberDiff line change
@@ -739,6 +739,13 @@ static void mm_align1(void *km, const mm_mapopt_t *opt, const mm_idx_t *mi, int
739739
if (ez->n_cigar > 0)
740740
mm_append_cigar(r, ez->n_cigar, ez->cigar);
741741
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.
742+
if (!r->p) {
743+
assert(ez->n_cigar == 0);
744+
uint32_t capacity = sizeof(mm_extra_t)/4;
745+
kroundup32(capacity);
746+
r->p = (mm_extra_t*)calloc(capacity, 4);
747+
r->p->capacity = capacity;
748+
}
742749
for (j = i - 1; j >= 0; --j)
743750
if ((int32_t)a[as1 + j].x <= rs + ez->max_t)
744751
break;

0 commit comments

Comments
 (0)
Please sign in to comment.