Skip to content

Commit

Permalink
Merge pull request mazaclub#4 from cpsola/opwithinbugfix
Browse files Browse the repository at this point in the history
minor bug fix: op_within log
  • Loading branch information
Kefkius authored Dec 2, 2016
2 parents 2873f42 + 02a1510 commit dce3151
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions hashmal_lib/core/stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -545,15 +545,15 @@ def check_args(n):
bn3 = _CastToBigNum(stack[-1], err_raiser)
bn2 = _CastToBigNum(stack[-2], err_raiser)
bn1 = _CastToBigNum(stack[-3], err_raiser)
stack.pop()
stack.pop()
stack.pop()
l3 = stack.pop()
l2 = stack.pop()
l1 = stack.pop()
v = (bn2 <= bn1) and (bn1 < bn3)
if v:
stack.append(b"\x01")
else:
stack.append(b"\x00")
last = '%s (the result of %s <= %s < %s) was pushed to the stack.' % e(stack[-1], bn2, bn1, bn3)
last = '%s (the result of %s <= %s < %s) was pushed to the stack.' % e(stack[-1], l2, l1, l3)

else:
err_raiser(EvalScriptError, 'unsupported opcode 0x%x' % sop)
Expand Down

0 comments on commit dce3151

Please sign in to comment.