From 474a36da49dddac4d9cd9bda766b5d430fc8d247 Mon Sep 17 00:00:00 2001 From: Wanping Lee Date: Mon, 2 May 2016 22:29:19 +0000 Subject: [PATCH] iFix the bug of N penalty. --- src/ssw_cpp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ssw_cpp.cpp b/src/ssw_cpp.cpp index 581179f..7bd3beb 100644 --- a/src/ssw_cpp.cpp +++ b/src/ssw_cpp.cpp @@ -38,12 +38,12 @@ void BuildSwScoreMatrix(const uint8_t& match_score, matrix[id] = ((i == j) ? match_score : static_cast(-mismatch_penalty)); ++id; } - matrix[id] = -mismatch_penalty; // For N + matrix[id] = static_cast(-mismatch_penalty); // For N ++id; } for (int i = 0; i < 5; ++i) - matrix[id++] = -mismatch_penalty; // For N + matrix[id++] = static_cast(-mismatch_penalty); // For N }