summaryrefslogtreecommitdiff
path: root/vendor/github.com/pelletier/go-toml/v2/decode.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/pelletier/go-toml/v2/decode.go')
-rw-r--r--vendor/github.com/pelletier/go-toml/v2/decode.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/vendor/github.com/pelletier/go-toml/v2/decode.go b/vendor/github.com/pelletier/go-toml/v2/decode.go
index 3a860d0f6..f0ec3b170 100644
--- a/vendor/github.com/pelletier/go-toml/v2/decode.go
+++ b/vendor/github.com/pelletier/go-toml/v2/decode.go
@@ -318,7 +318,7 @@ func parseFloat(b []byte) (float64, error) {
if cleaned[0] == '+' || cleaned[0] == '-' {
start = 1
}
- if cleaned[start] == '0' && isDigit(cleaned[start+1]) {
+ if cleaned[start] == '0' && len(cleaned) > start+1 && isDigit(cleaned[start+1]) {
return 0, unstable.NewParserError(b, "float integer part cannot have leading zeroes")
}