Skip to content

Commit

Permalink
fix crash when tiglen becomes larger than trimmed template
Browse files Browse the repository at this point in the history
  • Loading branch information
skoren committed Jan 4, 2024
1 parent 42a7eb6 commit 6a0d004
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/utgcns/unitigConsensus.C
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,8 @@ unitigConsensus::generateTemplateStitch(void) {
// enforce minimum template length
if (templateLen <= 1)
templateLen ++;
if (templateLen > tiglen)
templateLen = tiglen-1;

if (showAlgorithm()) {
fprintf(stderr, "\n");
Expand Down

0 comments on commit 6a0d004

Please sign in to comment.