mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 15:16:43 +00:00
common: parse single-digit hex addresses correctly
This commit is contained in:
parent
c5840ce12f
commit
d3c0b558fa
1 changed files with 2 additions and 0 deletions
|
|
@ -39,6 +39,8 @@ func FromHex(s string) []byte {
|
|||
s = "0" + s
|
||||
}
|
||||
return Hex2Bytes(s)
|
||||
} else if len(s) == 1 {
|
||||
return Hex2Bytes("0" + s)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue