提交 1bb398f4 编写于 作者: O obscuren

Sign ext

上级 3f90f7c8
......@@ -2,8 +2,6 @@ package ethutil
import "math/big"
var MaxInt256 *big.Int = BigD(Hex2Bytes("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"))
// Big pow
//
// Returns the power of two big integers
......
......@@ -394,7 +394,7 @@ func (self *DebugVm) RunClosure(closure *Closure) (ret []byte, err error) {
stack.Push(base)
case SIGNEXTEND:
back := stack.Pop().Uint64()
if back.Cmp(big.NewInt(31)) < 0 {
if back < 31 {
bit := uint(back*8 + 7)
num := stack.Pop()
mask := new(big.Int).Lsh(ethutil.Big1, bit)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册