Skip to content

Commit fdecc11

Browse files
committed
Temp fix for #342
1 parent 487c5cc commit fdecc11

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

vm/vm.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ func (self *Vm) Run(me, caller ContextRef, code []byte, value, gas, price *big.I
266266
base.Sub(Pow256, stack.Pop()).Sub(base, ethutil.Big1)
267267

268268
// Not needed
269-
//base = U256(base)
269+
base = U256(base)
270270

271271
stack.Push(base)
272272
case LT:
@@ -532,7 +532,7 @@ func (self *Vm) Run(me, caller ContextRef, code []byte, value, gas, price *big.I
532532
case NUMBER:
533533
number := self.env.BlockNumber()
534534

535-
stack.Push(number)
535+
stack.Push(U256(number))
536536

537537
self.Printf(" => 0x%x", number.Bytes())
538538
case DIFFICULTY:
@@ -676,6 +676,7 @@ func (self *Vm) Run(me, caller ContextRef, code []byte, value, gas, price *big.I
676676
gas := stack.Pop()
677677
// Pop gas and value of the stack.
678678
value, addr := stack.Popn()
679+
value = U256(value)
679680
// Pop input size and offset
680681
inSize, inOffset := stack.Popn()
681682
// Pop return size and offset

0 commit comments

Comments
 (0)