good morning!!!!

Skip to content
Snippets Groups Projects
Commit f6f81169 authored by Jeffrey Wilcke's avatar Jeffrey Wilcke
Browse files

core/vm: Fork fix. Removal of appending 0 bytes in memset

parent 03faccfb
Branches
Tags
No related merge requests found
package vm package vm
import ( import "fmt"
"fmt"
"github.com/ethereum/go-ethereum/common"
)
type Memory struct { type Memory struct {
store []byte store []byte
...@@ -24,7 +20,7 @@ func (m *Memory) Set(offset, size uint64, value []byte) { ...@@ -24,7 +20,7 @@ func (m *Memory) Set(offset, size uint64, value []byte) {
// It's possible the offset is greater than 0 and size equals 0. This is because // It's possible the offset is greater than 0 and size equals 0. This is because
// the calcMemSize (common.go) could potentially return 0 when size is zero (NO-OP) // the calcMemSize (common.go) could potentially return 0 when size is zero (NO-OP)
if size > 0 { if size > 0 {
copy(m.store[offset:offset+size], common.RightPadBytes(value, int(size))) copy(m.store[offset:offset+size], value)
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment