From 3d9a4e7084c33cb28a2265c0dd232a0ea3871c92 Mon Sep 17 00:00:00 2001 From: obscuren Date: Wed, 3 Dec 2014 12:21:12 +0100 Subject: Fixed mem error in vm. Fixed logs tests --- vm/stack.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'vm/stack.go') 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 } -- cgit