Commit f3822fc3 authored by Damien's avatar Damien
Browse files

Fix but with optimised range being 1 over.

parent 6d42ab66
......@@ -1378,15 +1378,15 @@ void compile_for_stmt_optimised_range(compiler_t *comp, py_parse_node_t pn_var,
EMIT(jump, continue_label);
EMIT(label_assign, top_label);
// compile body
compile_node(comp, pn_body);
// compile: var += step
c_assign(comp, pn_var, ASSIGN_AUG_LOAD);
compile_node(comp, pn_step);
EMIT(binary_op, RT_BINARY_OP_INPLACE_ADD);
c_assign(comp, pn_var, ASSIGN_AUG_STORE);
// compile body
compile_node(comp, pn_body);
EMIT(label_assign, continue_label);
// compile: if var < end: goto top
......
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