Skip to content
This repository has been archived by the owner on Mar 8, 2020. It is now read-only.

Commit

Permalink
Increase checked max line column by 1
Browse files Browse the repository at this point in the history
Signed-off-by: Juanjo Alvarez <[email protected]>
  • Loading branch information
Juanjo Alvarez authored and juanjux committed Aug 9, 2018
1 parent 87a446e commit 7afaacb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion uast/transformer/positioner/positions.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func (idx *positionIndex) Offset(line, col int) (int, error) {
maxCol = 1
}

if col < minCol || (maxCol > 0 && col > maxCol) {
if col < minCol || (maxCol > 0 && col - 1 > maxCol) {
return 0, fmt.Errorf("column out of bounds: %d [%d, %d]", col, minCol, maxCol)
}

Expand Down

0 comments on commit 7afaacb

Please sign in to comment.