fixed potential integer overflows

This commit is contained in:
Heng Li
2021-07-16 17:20:05 -04:00
parent b046052d82
commit 5f449c5cae
4 changed files with 4 additions and 4 deletions

2
map.c
View File

@@ -318,7 +318,7 @@ void mm_map_frag(const mm_idx_t *mi, int n_segs, const int *qlens, const char **
b->frag_gap = max_chain_gap_ref;
b->rep_len = rep_len;
regs0 = mm_gen_regs(b->km, hash, qlen_sum, n_regs0, u, a, opt->flag&MM_F_QSTRAND);
regs0 = mm_gen_regs(b->km, hash, qlen_sum, n_regs0, u, a, !!(opt->flag&MM_F_QSTRAND));
if (mi->n_alt) {
mm_mark_alt(mi, n_regs0, regs0);
mm_hit_sort(b->km, &n_regs0, regs0, opt->alt_drop); // this step can be merged into mm_gen_regs(); will do if this shows up in profile