From 347cb272bea3f5abddc6ee2f63917f3b8f655d43 Mon Sep 17 00:00:00 2001 From: obscuren Date: Thu, 12 Mar 2015 19:41:56 +0100 Subject: fixed ethtest --- vm/vm.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'vm/vm.go') diff --git a/vm/vm.go b/vm/vm.go index 0cf1f9af3..97f2fef62 100644 --- a/vm/vm.go +++ b/vm/vm.go @@ -235,9 +235,9 @@ func (self *Vm) Run(me, caller ContextRef, code []byte, value, gas, price *big.I stack.push(base) case SIGNEXTEND: - back := stack.pop().Uint64() - if back < 31 { - bit := uint(back*8 + 7) + back := stack.pop() + if back.Cmp(big.NewInt(31)) < 0 { + bit := uint(back.Uint64()*8 + 7) num := stack.pop() mask := new(big.Int).Lsh(ethutil.Big1, bit) mask.Sub(mask, ethutil.Big1) -- cgit v1.2.3