aboutsummaryrefslogtreecommitdiffstats
path: root/vm
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-01-10 00:38:35 +0800
committerobscuren <geffobscura@gmail.com>2015-01-10 00:38:35 +0800
commit905b8cc82f3dc29131f45ccf29bd1d6c967fe132 (patch)
tree61f251d788868263cdd93aeb7c19b8ea3f3e0be4 /vm
parent35f4bb96f313f4f04e70d1cf135be3a4759a8179 (diff)
downloaddexon-905b8cc82f3dc29131f45ccf29bd1d6c967fe132.tar.gz
dexon-905b8cc82f3dc29131f45ccf29bd1d6c967fe132.tar.zst
dexon-905b8cc82f3dc29131f45ccf29bd1d6c967fe132.zip
mem fixes for vm. Changed uncle inclusion tests
Diffstat (limited to 'vm')
-rw-r--r--vm/stack.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/vm/stack.go b/vm/stack.go
index f20470db3..e31f3eb57 100644
--- a/vm/stack.go
+++ b/vm/stack.go
@@ -142,6 +142,10 @@ func (m *Memory) Resize(size uint64) {
}
func (m *Memory) Get(offset, size int64) []byte {
+ if size == 0 {
+ return nil
+ }
+
if len(m.store) > int(offset) {
end := int(math.Min(float64(len(m.store)), float64(offset+size)))