Skip to content

Commit

Permalink
[qregex]: Force a fail if cursor starting pos > end of string.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmichaud committed Jul 9, 2012
1 parent 8137a66 commit 2452100
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/QAST/Compiler.nqp
Expand Up @@ -42,6 +42,7 @@ class QAST::Compiler is HLL::Compiler {
$ops.push_pirop('store_lex', 'unicode:"$\x{a2}"', %*REG<cur>);
$ops.push_pirop('length', %*REG<eos>, %*REG<tgt>);
$ops.push_pirop('eq', '$I19', 1, $restartlabel);
$ops.push_pirop('gt', %*REG<pos>, %*REG<eos>, %*REG<fail>);
$ops.push(self.regex_post($node));
$ops.push($restartlabel);
$ops.push_pirop('repr_get_attr_obj', %*REG<cstack>, %*REG<cur>, %*REG<curclass>, '"$!cstack"');
Expand Down

0 comments on commit 2452100

Please sign in to comment.