Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
ident could accidentally ord past end of string; check for this. Fixe…
…s at least one of the Rakudo regressions.
  • Loading branch information
jnthn committed May 26, 2012
1 parent 813a2d5 commit 7c5d69d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/QRegex/Cursor.nqp
Expand Up @@ -299,8 +299,9 @@ role NQPCursorRole {
pir::find_not_cclass__Iisii(
pir::const::CCLASS_WORD,
$!target, $!pos, nqp::chars($!target)))
if nqp::ord($!target, $!pos) == 95
|| nqp::iscclass(pir::const::CCLASS_ALPHABETIC, $!target, $!pos);
if $!pos < nqp::chars($!target) &&
(nqp::ord($!target, $!pos) == 95
|| nqp::iscclass(pir::const::CCLASS_ALPHABETIC, $!target, $!pos));
$cur;
}

Expand Down

0 comments on commit 7c5d69d

Please sign in to comment.