Commit 5cb96330 authored by Stefan Behnel's avatar Stefan Behnel

fix off-by-one

parent c7534618
......@@ -5732,7 +5732,7 @@ class IfStatNode(StatNode):
def generate_execution_code(self, code):
code.mark_pos(self.pos)
end_label = code.new_label()
last = len(self.if_clauses)
last = len(self.if_clauses) - 1
for i, if_clause in enumerate(self.if_clauses):
if_clause.generate_execution_code(code, end_label, is_last=i == last)
if self.else_clause:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment