aboutsummaryrefslogtreecommitdiffstats
path: root/vm/vm.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-03-13 02:41:56 +0800
committerobscuren <geffobscura@gmail.com>2015-03-13 02:41:56 +0800
commit347cb272bea3f5abddc6ee2f63917f3b8f655d43 (patch)
tree16e0b17bd57469589445827c9bda6161ef99be76 /vm/vm.go
parentd1c872bace8f3e87f34bc97167892c09ab4de193 (diff)
downloadgo-tangerine-347cb272bea3f5abddc6ee2f63917f3b8f655d43.tar
go-tangerine-347cb272bea3f5abddc6ee2f63917f3b8f655d43.tar.gz
go-tangerine-347cb272bea3f5abddc6ee2f63917f3b8f655d43.tar.bz2
go-tangerine-347cb272bea3f5abddc6ee2f63917f3b8f655d43.tar.lz
go-tangerine-347cb272bea3f5abddc6ee2f63917f3b8f655d43.tar.xz
go-tangerine-347cb272bea3f5abddc6ee2f63917f3b8f655d43.tar.zst
go-tangerine-347cb272bea3f5abddc6ee2f63917f3b8f655d43.zip
fixed ethtest
Diffstat (limited to 'vm/vm.go')
-rw-r--r--vm/vm.go6
1 files changed, 3 insertions, 3 deletions
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)