Skip to content

Commit

Permalink
Fix an issue in computation of overlapping locations
Browse files Browse the repository at this point in the history
  • Loading branch information
sungshik committed Oct 29, 2024
1 parent cc3d30d commit d196a58
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/org/rascalmpl/library/Prelude.java
Original file line number Diff line number Diff line change
Expand Up @@ -4110,9 +4110,9 @@ public IBool isOverlapping(ISourceLocation first, ISourceLocation second) {
if (first.hasOffsetLength()) {
if (second.hasOffsetLength()) {
int firstStart = first.getOffset();
int firstEnd = firstStart + first.getLength();
int firstEnd = firstStart + first.getLength() - 1; // Inclusive
int secondStart = second.getOffset();
int secondEnd = secondStart + second.getLength();
int secondEnd = secondStart + second.getLength() - 1; // Inclusive

return values.bool(
(firstStart <= secondStart && secondStart <= firstEnd)
Expand Down

0 comments on commit d196a58

Please sign in to comment.