Skip to content

Commit

Permalink
Fix not allowing negative positions after first index correction
Browse files Browse the repository at this point in the history
  • Loading branch information
untergasser committed Sep 25, 2024
1 parent 040b3d5 commit a70770e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/libprimer3.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7783,9 +7783,12 @@ _check_and_adjust_1_interval(const char *tag_name,
pr_append(err, " illegal interval");
return 1;
}
intervals[i][0] -= first_index;
if (intervals[i][0] - first_index > 0) {
intervals[i][0] -= first_index;
} else {
intervals[i][0] = 0;
}
}

for (i=0; i < num_intervals; i++) {
if (empty_allowed && (intervals[i][0] == -1) && (intervals[i][1] == -1))
continue;
Expand Down

0 comments on commit a70770e

Please sign in to comment.