Skip to content

Commit

Permalink
always checking for bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
jakeret committed Jan 18, 2016
1 parent 342a47a commit 21bb826
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hope/_generator.py
Expand Up @@ -251,14 +251,14 @@ def visit_Call(self, node):
if "left" in node.keywords:
left_ret = self.visit(node.keywords["left"])
else:
left_ret = left_val
left_ret = "c{0}[0]".format(args[2])

ret = "{0} < {1} ? {2} : ({3})".format(self.visit(node.args[0]), left_val, left_ret, ret)

if "right" in node.keywords:
right_ret = self.visit(node.keywords["right"])
else:
right_ret = right_val
right_ret = "c{0}[{1}]".format(args[2], size + "-1")

ret = "{0} > {1} ? {2} : ({3})".format(self.visit(node.args[0]), right_val, right_ret, ret)

Expand Down

0 comments on commit 21bb826

Please sign in to comment.