This commit is contained in:
obscuren 2014-11-02 19:39:45 +01:00
parent 3f90f7c898
commit 1bb398f4e2
2 changed files with 1 additions and 3 deletions

View File

@ -2,8 +2,6 @@ package ethutil
import "math/big" import "math/big"
var MaxInt256 *big.Int = BigD(Hex2Bytes("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"))
// Big pow // Big pow
// //
// Returns the power of two big integers // Returns the power of two big integers

View File

@ -394,7 +394,7 @@ func (self *DebugVm) RunClosure(closure *Closure) (ret []byte, err error) {
stack.Push(base) stack.Push(base)
case SIGNEXTEND: case SIGNEXTEND:
back := stack.Pop().Uint64() back := stack.Pop().Uint64()
if back.Cmp(big.NewInt(31)) < 0 { if back < 31 {
bit := uint(back*8 + 7) bit := uint(back*8 + 7)
num := stack.Pop() num := stack.Pop()
mask := new(big.Int).Lsh(ethutil.Big1, bit) mask := new(big.Int).Lsh(ethutil.Big1, bit)