mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
core/vm: fix opExchange
This commit is contained in:
parent
d1317f2f76
commit
b5af91a5c9
1 changed files with 4 additions and 4 deletions
|
|
@ -1060,11 +1060,11 @@ func opSwapN(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]by
|
|||
func opExchange(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) {
|
||||
var (
|
||||
code = scope.Contract.CodeAt(scope.CodeSection)
|
||||
index = int(code[*pc+1]) + 1
|
||||
n = index>>4 + 1
|
||||
m = index%0x0F + 1
|
||||
index = int(code[*pc+1])
|
||||
n = (index >> 4) + 1
|
||||
m = (index & 0x0F) + 1
|
||||
)
|
||||
scope.Stack.swapN(n, m)
|
||||
scope.Stack.swapN(n+1, n+m+1)
|
||||
*pc += 1
|
||||
return nil, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue