Update big.go

This commit is contained in:
Dean Eigenmann 2024-06-17 17:42:44 +02:00 committed by GitHub
parent 7340846434
commit 0c9b7dc634
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -54,7 +54,7 @@ func NewHexOrDecimal256(x int64) *HexOrDecimal256 {
// It is similar to UnmarshalText, but allows parsing real decimals too, not just // It is similar to UnmarshalText, but allows parsing real decimals too, not just
// quoted decimal strings. // quoted decimal strings.
func (i *HexOrDecimal256) UnmarshalJSON(input []byte) error { func (i *HexOrDecimal256) UnmarshalJSON(input []byte) error {
if len(input) > 2 && input[0] == '"' { if len(input) > 1 && input[0] == '"' {
input = input[1 : len(input)-1] input = input[1 : len(input)-1]
} }
return i.UnmarshalText(input) return i.UnmarshalText(input)