From 0d64163fea3a266ceb71cb4c4ee5682052c9ca6c Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 10 Mar 2015 01:13:06 +0100 Subject: [PATCH] Right pad zeros. Closes #446 --- vm/context.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/context.go b/vm/context.go index b48f1a657..9ce07bc4a 100644 --- a/vm/context.go +++ b/vm/context.go @@ -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 {