Skip to content

Commit 474a36d

Browse files
author
Wanping Lee
committed
iFix the bug of N penalty.
1 parent 6cd58ef commit 474a36d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ssw_cpp.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ void BuildSwScoreMatrix(const uint8_t& match_score,
3838
matrix[id] = ((i == j) ? match_score : static_cast<int8_t>(-mismatch_penalty));
3939
++id;
4040
}
41-
matrix[id] = -mismatch_penalty; // For N
41+
matrix[id] = static_cast<int8_t>(-mismatch_penalty); // For N
4242
++id;
4343
}
4444

4545
for (int i = 0; i < 5; ++i)
46-
matrix[id++] = -mismatch_penalty; // For N
46+
matrix[id++] = static_cast<int8_t>(-mismatch_penalty); // For N
4747

4848
}
4949

0 commit comments

Comments
 (0)