diff options
Diffstat (limited to 'vendor/github.com/tdewolff/parse/strconv/int.go')
-rw-r--r-- | vendor/github.com/tdewolff/parse/strconv/int.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/vendor/github.com/tdewolff/parse/strconv/int.go b/vendor/github.com/tdewolff/parse/strconv/int.go index 7101daa..a84ecf3 100644 --- a/vendor/github.com/tdewolff/parse/strconv/int.go +++ b/vendor/github.com/tdewolff/parse/strconv/int.go @@ -1,6 +1,8 @@ package strconv // import "github.com/tdewolff/parse/strconv" -import "math" +import ( + "math" +) // Int parses a byte-slice and returns the integer it represents. // If an invalid character is encountered, it will stop there. @@ -34,6 +36,9 @@ func ParseInt(b []byte) (int64, int) { func LenInt(i int64) int { if i < 0 { + if i == -9223372036854775808 { + return 19 + } i = -i } switch { |