Skip to content

Commit e3b16fa

Browse files
Fix issue #916
1 parent ddc19be commit e3b16fa

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/prefiltering/QueryMatcher.cpp

+7-4
Original file line numberDiff line numberDiff line change
@@ -323,11 +323,14 @@ size_t QueryMatcher::match(Sequence *seq, float *compositionBias) {
323323
outer:
324324
indexPointer[indexTo + 1] = databaseHits + numMatches;
325325
// fill the output
326-
size_t hitCount = findDuplicates(indexPointer, foundDiagonals + overflowHitCount,
326+
size_t hitCount = 0;
327+
if(numMatches > 0){
328+
hitCount = findDuplicates(indexPointer, foundDiagonals + overflowHitCount,
327329
foundDiagonalsSize - overflowHitCount, indexStart, indexTo, (diagonalScoring == false));
328-
if (overflowHitCount != 0) {
329-
// overflow occurred
330-
hitCount = mergeElements(foundDiagonals, overflowHitCount + hitCount);
330+
if (overflowHitCount != 0) {
331+
// overflow occurred
332+
hitCount = mergeElements(foundDiagonals, overflowHitCount + hitCount);
333+
}
331334
}
332335
stats->doubleMatches = 0;
333336
if (diagonalScoring == false) {

0 commit comments

Comments
 (0)