Skip to content

Commit

Permalink
exit if segment length exceeds max mapping length
Browse files Browse the repository at this point in the history
  • Loading branch information
ASLeonard authored Sep 6, 2024
1 parent 4521c10 commit 081671c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/interface/parse_args.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,11 @@ void parse_args(int argc,
map_parameters.max_mapping_length = 50000;
}

if (map_parameters.segLength >= map_parameters.max_mapping_length) {
std::cerr << "[wfmash] ERROR, skch::parseandSave, segment length should not be larger than max mapping length." << std::endl;
exit(1);
}

if (drop_low_map_pct_identity) {
map_parameters.keep_low_pct_id = false;
} else {
Expand Down

0 comments on commit 081671c

Please sign in to comment.