Fixed size 0 bug

This commit is contained in:
obscuren 2015-01-09 15:30:46 +01:00
parent f9b0d1a8e7
commit 5c8c0ae04e
2 changed files with 5 additions and 1 deletions

View File

@ -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])

View File

@ -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) {