The code uses unsigned int for scores, match scores, and the penalties. If the penalties are higher than the match scores, then mismatches/indels in the early stages do not get accounted. For example, if match score is 2 and indels is 3, and if there a match followed by 2 indels, the score is at the end of matching indels is 0 and not -4. This results in passing false positives.
The code uses unsigned int for scores, match scores, and the penalties. If the penalties are higher than the match scores, then mismatches/indels in the early stages do not get accounted. For example, if match score is 2 and indels is 3, and if there a match followed by 2 indels, the score is at the end of matching indels is 0 and not -4. This results in passing false positives.