From 1bb398f4e22feef8f83fedd8a525e4da5b627773 Mon Sep 17 00:00:00 2001 From: obscuren Date: Sun, 2 Nov 2014 19:39:45 +0100 Subject: [PATCH] Sign ext --- ethutil/big.go | 2 -- vm/vm_debug.go | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/ethutil/big.go b/ethutil/big.go index 8d7b3fe70..07d1386e1 100644 --- a/ethutil/big.go +++ b/ethutil/big.go @@ -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 diff --git a/vm/vm_debug.go b/vm/vm_debug.go index 129ea1a59..05ae347f6 100644 --- a/vm/vm_debug.go +++ b/vm/vm_debug.go @@ -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)