Skip to content

Commit

Permalink
fix: throw error when stripped sequence has zero length
Browse files Browse the repository at this point in the history
  • Loading branch information
rneher committed Feb 11, 2021
1 parent a33dd6b commit 2b74257
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/nextalign/src/translate/extractGene.cpp
Expand Up @@ -92,7 +92,7 @@ NucleotideSequence extractGeneQuery(
stripGeneInPlace(result);

const auto resultLength = safe_cast<int>(result.size());
if (resultLength % 3 != 0) {
if (resultLength % 3 != 0 || resultLength == 0) {
throw ErrorExtractGeneLengthInvalid(gene.geneName, resultLength);
}

Expand Down

0 comments on commit 2b74257

Please sign in to comment.