mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-14 20:16:36 +00:00
Do not panic, but return nil instead
This commit is contained in:
parent
15e0093e13
commit
6c91ffcfbe
1 changed files with 1 additions and 1 deletions
|
|
@ -176,7 +176,7 @@ func (val *Value) Get(idx int) *Value {
|
||||||
}
|
}
|
||||||
|
|
||||||
if idx < 0 {
|
if idx < 0 {
|
||||||
panic("negative idx for Value Get")
|
return NewValue(nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
return NewValue(d[idx])
|
return NewValue(d[idx])
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue