Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

Commit

Permalink
Avoid "Can't substr beyond end of string" errors -- if we're already
Browse files Browse the repository at this point in the history
beyond the end of the target, then just fail.
  • Loading branch information
pmichaud committed Jun 2, 2010
1 parent 45a6612 commit 8483d1f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/PAST/Compiler-Regex.pir
Expand Up @@ -130,6 +130,7 @@ Return the POST representation of the regex AST rooted by C<node>.
ops.'push_pirop'('.local pmc', 'match')
ops.'push_pirop'('.lex', '"$/"', 'match')
ops.'push_pirop'('length', eos, tgt, 'result'=>eos)
ops.'push_pirop'('gt', pos, eos, donelabel)

# On Parrot, indexing into variable-width encoded strings
# (such as utf8) becomes much more expensive as we move
Expand Down

0 comments on commit 8483d1f

Please sign in to comment.