Skip to content

Commit

Permalink
Revert "Fix integer conversion (#767)"
Browse files Browse the repository at this point in the history
This reverts commit 395523c.
  • Loading branch information
kmichaelk authored Nov 15, 2024
1 parent 53e9784 commit 95163f3
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions internal/lsp/span/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"strconv"
"strings"
"unicode/utf8"
"math"
)

// Parse returns the location represented by the input.
Expand Down Expand Up @@ -87,10 +86,8 @@ func rstripSuffix(input string) suffix {
if last >= 0 && last < len(remains)-1 {
number, err := strconv.ParseInt(remains[last+1:], 10, 64)
if err == nil {
if number >= math.MinInt && number <= math.MaxInt {
num = int(number)
remains = remains[:last+1]
}
num = int(number)
remains = remains[:last+1]
}
}
// now see if we have a trailing separator
Expand Down

0 comments on commit 95163f3

Please sign in to comment.