File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ func NewHexOrDecimal256(x int64) *HexOrDecimal256 {
5353// It is similar to UnmarshalText, but allows parsing real decimals too, not just
5454// quoted decimal strings.
5555func (i * HexOrDecimal256 ) UnmarshalJSON (input []byte ) error {
56- if len (input ) > 0 && input [0 ] == '"' {
56+ if len (input ) > 1 && input [0 ] == '"' {
5757 input = input [1 : len (input )- 1 ]
5858 }
5959 return i .UnmarshalText (input )
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ type HexOrDecimal64 uint64
4646// It is similar to UnmarshalText, but allows parsing real decimals too, not just
4747// quoted decimal strings.
4848func (i * HexOrDecimal64 ) UnmarshalJSON (input []byte ) error {
49- if len (input ) > 0 && input [0 ] == '"' {
49+ if len (input ) > 1 && input [0 ] == '"' {
5050 input = input [1 : len (input )- 1 ]
5151 }
5252 return i .UnmarshalText (input )
You can’t perform that action at this time.
0 commit comments