Skip to content

Commit

Permalink
make sure evaluating a Range's begin at first. fix #1495
Browse files Browse the repository at this point in the history
  • Loading branch information
Watson1978 committed Apr 5, 2012
1 parent 5ad5ef9 commit cf2d056
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions compiler.cpp
Expand Up @@ -4296,10 +4296,14 @@ RoxorCompiler::compile_node0(NODE *node)

case NODE_DOT2:
case NODE_DOT3:
assert(node->nd_beg != NULL);
assert(node->nd_end != NULL);
return compile_range(compile_node(node->nd_beg),
compile_node(node->nd_end), nd_type(node) == NODE_DOT3);
{
assert(node->nd_beg != NULL);
assert(node->nd_end != NULL);
Value *beg = compile_node(node->nd_beg);
Value *end = compile_node(node->nd_end);
return compile_range(beg, end, nd_type(node) == NODE_DOT3);
}
break;

case NODE_FLIP2:
case NODE_FLIP3:
Expand Down

0 comments on commit cf2d056

Please sign in to comment.