diff --git a/common/big.go b/common/big.go index c813632618..31bd589eb7 100644 --- a/common/big.go +++ b/common/big.go @@ -20,14 +20,13 @@ import "math/big" // Common big integers often used var ( - Big1 = big.NewInt(1) - Big2 = big.NewInt(2) - Big3 = big.NewInt(3) - Big0 = big.NewInt(0) - BigTrue = Big1 - Big32 = big.NewInt(32) - Big256 = big.NewInt(0xff) - Big257 = big.NewInt(257) + Big1 = big.NewInt(1) + Big2 = big.NewInt(2) + Big3 = big.NewInt(3) + Big0 = big.NewInt(0) + Big32 = big.NewInt(32) + Big256 = big.NewInt(0xff) + Big257 = big.NewInt(257) ) func String2Big(num string) *big.Int { diff --git a/core/vm/instructions.go b/core/vm/instructions.go index 79f71ceaa9..8b7bcc4d61 100644 --- a/core/vm/instructions.go +++ b/core/vm/instructions.go @@ -505,7 +505,7 @@ func opJump(pc *uint64, evm *EVM, contract *Contract, memory *Memory, stack *Sta } func opJumpi(pc *uint64, evm *EVM, contract *Contract, memory *Memory, stack *Stack) ([]byte, error) { pos, cond := stack.pop(), stack.pop() - if cond.Cmp(common.BigTrue) >= 0 { + if cond.BitLen() > 0 { if !contract.jumpdests.has(contract.CodeHash, contract.Code, pos) { nop := contract.GetOp(pos.Uint64()) return nil, fmt.Errorf("invalid jump destination (%v) %v", nop, pos)