diff --git a/vm/stack.go b/vm/stack.go index b9eaa10cd..f20470db3 100644 --- a/vm/stack.go +++ b/vm/stack.go @@ -152,6 +152,10 @@ func (m *Memory) Get(offset, size int64) []byte { } func (self *Memory) Geti(offset, size int64) (cpy []byte) { + if size == 0 { + return nil + } + if len(self.store) > int(offset) { cpy = make([]byte, size) copy(cpy, self.store[offset:offset+size]) diff --git a/vm/vm_debug.go b/vm/vm_debug.go index 92e4154e4..656487c9b 100644 --- a/vm/vm_debug.go +++ b/vm/vm_debug.go @@ -34,7 +34,7 @@ func NewDebugVm(env Environment) *DebugVm { lt = LogTyDiff } - return &DebugVm{env: env, logTy: lt, Recoverable: true} + return &DebugVm{env: env, logTy: lt, Recoverable: false} } func (self *DebugVm) Run(me, caller ContextRef, code []byte, value, gas, price *big.Int, callData []byte) (ret []byte, err error) {