diff options
author | obscuren <geffobscura@gmail.com> | 2015-03-19 21:31:41 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-03-19 21:31:41 +0800 |
commit | d4e5747d040f290eb3697ded891619887a8593da (patch) | |
tree | 4df57f053b3a4dd7b7dde4fde3d4ddeafd14f98e /vm/common.go | |
parent | e13c6739804604849c7e43d27b073e68fba58191 (diff) | |
parent | cf45b939a098c9421092226d5c76dbce34eb2dda (diff) | |
download | go-tangerine-d4e5747d040f290eb3697ded891619887a8593da.tar go-tangerine-d4e5747d040f290eb3697ded891619887a8593da.tar.gz go-tangerine-d4e5747d040f290eb3697ded891619887a8593da.tar.bz2 go-tangerine-d4e5747d040f290eb3697ded891619887a8593da.tar.lz go-tangerine-d4e5747d040f290eb3697ded891619887a8593da.tar.xz go-tangerine-d4e5747d040f290eb3697ded891619887a8593da.tar.zst go-tangerine-d4e5747d040f290eb3697ded891619887a8593da.zip |
Merge branch 'develop' 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)) } |