Skip to content

Commit

Permalink
Right pad zeros. Closes #446
Browse files Browse the repository at this point in the history
  • Loading branch information
obscuren committed Mar 10, 2015
1 parent 9007f2b commit 0d64163
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vm/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func (c *Context) GetRangeValue(x, size uint64) []byte {
x = uint64(math.Min(float64(x), 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 {
Expand Down

0 comments on commit 0d64163

Please sign in to comment.