aboutsummaryrefslogtreecommitdiffstats
path: root/vm/stack.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-12-03 19:21:12 +0800
committerobscuren <geffobscura@gmail.com>2014-12-03 19:21:12 +0800
commit3d9a4e7084c33cb28a2265c0dd232a0ea3871c92 (patch)
tree84b7ccf6ea1ccc4eca0b8ded0a382c1bfe98e190 /vm/stack.go
parentf7789220862f67c2aadaf7b6a44fcd54152dd234 (diff)
downloaddexon-3d9a4e7084c33cb28a2265c0dd232a0ea3871c92.tar.gz
dexon-3d9a4e7084c33cb28a2265c0dd232a0ea3871c92.tar.zst
dexon-3d9a4e7084c33cb28a2265c0dd232a0ea3871c92.zip
Fixed mem error in vm. Fixed logs tests
Diffstat (limited to 'vm/stack.go')
-rw-r--r--vm/stack.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/vm/stack.go b/vm/stack.go
index 2eca60ad1..98795cc03 100644
--- a/vm/stack.go
+++ b/vm/stack.go
@@ -147,9 +147,8 @@ func (m *Memory) Get(offset, size int64) []byte {
func (self *Memory) Geti(offset, size int64) (cpy []byte) {
if len(self.store) > int(offset) {
- s := int64(math.Min(float64(len(self.store)), float64(offset+size)))
cpy = make([]byte, size)
- copy(cpy, self.store[offset:offset+s])
+ copy(cpy, self.store[offset:offset+size])
return
}