Skip to content

Commit

Permalink
Fix origin location fixer exception because end offset is exclusive now.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gohla committed Jul 20, 2021
1 parent 7feefdf commit b0b8c2b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public static Result fixOriginLocations(Text text, IStrategoTerm ast, ITokens to
newStart = stringFragment.startOffset + (startOffset - offset);
}
int endOffset = region.getEndOffset();
if(endOffset >= offset && endOffset < pieceEndExclusive) {
if(endOffset >= offset && endOffset <= pieceEndExclusive) {
newEnd = stringFragment.startOffset + (endOffset - offset);
}
offset += stringFragment.text.length();
Expand Down

0 comments on commit b0b8c2b

Please sign in to comment.