Skip to content

Commit

Permalink
Sign ext
Browse files Browse the repository at this point in the history
  • Loading branch information
obscuren committed Nov 2, 2014
1 parent 3f90f7c commit 1bb398f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions ethutil/big.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion vm/vm_debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1bb398f

Please sign in to comment.