mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-26 05:27:19 +00:00
Right pad zeros. Closes #446
This commit is contained in:
parent
9007f2bbdc
commit
0d64163fea
@ -58,7 +58,7 @@ func (c *Context) GetRangeValue(x, size uint64) []byte {
|
|||||||
x = uint64(math.Min(float64(x), float64(len(c.Code))))
|
x = uint64(math.Min(float64(x), float64(len(c.Code))))
|
||||||
y := uint64(math.Min(float64(x+size), float64(len(c.Code))))
|
y := uint64(math.Min(float64(x+size), float64(len(c.Code))))
|
||||||
|
|
||||||
return ethutil.LeftPadBytes(c.Code[x:y], int(size))
|
return ethutil.RightPadBytes(c.Code[x:y], int(size))
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Context) GetCode(x, size uint64) []byte {
|
func (c *Context) GetCode(x, size uint64) []byte {
|
||||||
|
Loading…
Reference in New Issue
Block a user