mirror of
https://github.com/lh3/minimap2.git
synced 2026-10-05 05:38:11 +08:00
r1012: fixed an off-by-one bug; resolves #489
This commit is contained in:
@@ -38,8 +38,8 @@ static inline void update_max_zdrop(int32_t score, int i, int j, int32_t *max, i
|
|||||||
int z = *max - score - diff * e;
|
int z = *max - score - diff * e;
|
||||||
if (z > *max_zdrop) {
|
if (z > *max_zdrop) {
|
||||||
*max_zdrop = z;
|
*max_zdrop = z;
|
||||||
pos[0][0] = *max_i, pos[0][1] = i + 1;
|
pos[0][0] = *max_i, pos[0][1] = i;
|
||||||
pos[1][0] = *max_j, pos[1][1] = j + 1;
|
pos[1][0] = *max_j, pos[1][1] = j;
|
||||||
}
|
}
|
||||||
} else *max = score, *max_i = i, *max_j = j;
|
} else *max = score, *max_i = i, *max_j = j;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user