diff options
author | Felix Lange <fjl@twurst.com> | 2015-03-19 22:21:49 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2015-03-19 22:21:49 +0800 |
commit | ce063e8d9c2d26dd283a43b097903628225179ea (patch) | |
tree | 3bf88d349fd799285d75926f4486cb13f3cc7c70 /vm/common.go | |
parent | e80dda605130479086bed363e395a102a89a574a (diff) | |
parent | 797bbce15ecf9ec76f6375a328c63eb9abcc3b5a (diff) | |
download | go-tangerine-ce063e8d9c2d26dd283a43b097903628225179ea.tar go-tangerine-ce063e8d9c2d26dd283a43b097903628225179ea.tar.gz go-tangerine-ce063e8d9c2d26dd283a43b097903628225179ea.tar.bz2 go-tangerine-ce063e8d9c2d26dd283a43b097903628225179ea.tar.lz go-tangerine-ce063e8d9c2d26dd283a43b097903628225179ea.tar.xz go-tangerine-ce063e8d9c2d26dd283a43b097903628225179ea.tar.zst go-tangerine-ce063e8d9c2d26dd283a43b097903628225179ea.zip |
Merge remote-tracking branch 'ethereum/conversion' into conversion
Diffstat (limited to 'vm/common.go')
-rw-r--r-- | vm/common.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/vm/common.go b/vm/common.go index cedc0f309..5441a4ac5 100644 --- a/vm/common.go +++ b/vm/common.go @@ -73,9 +73,9 @@ func toValue(val *big.Int) interface{} { return val } -func getCode(code []byte, start, size uint64) []byte { - x := uint64(math.Min(float64(start), float64(len(code)))) - y := uint64(math.Min(float64(x+size), float64(len(code)))) +func getData(data []byte, start, size uint64) []byte { + x := uint64(math.Min(float64(start), float64(len(data)))) + y := uint64(math.Min(float64(x+size), float64(len(data)))) - return common.RightPadBytes(code[x:y], int(size)) + return common.RightPadBytes(data[x:y], int(size)) } |