Commit f6f81169 authored by obscuren's avatar obscuren

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

parent 03faccfb
package vm
import (
"fmt"
"github.com/ethereum/go-ethereum/common"
)
import "fmt"
type Memory struct {
store []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
// the calcMemSize (common.go) could potentially return 0 when size is zero (NO-OP)
if size > 0 {
copy(m.store[offset:offset+size], common.RightPadBytes(value, int(size)))
copy(m.store[offset:offset+size], value)
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment