浏览代码

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

obscuren 10 年之前
父节点
当前提交
f6f81169fe
共有 1 个文件被更改,包括 2 次插入6 次删除
  1. 2 6
      core/vm/memory.go

+ 2 - 6
core/vm/memory.go

@@ -1,10 +1,6 @@
 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)
 	}
 }