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

Commit

Permalink
Empty protoregexes return a fail.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmichaud committed Oct 19, 2009
1 parent 0428b85 commit 2188043
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/cheats/regex-cursor-protoregex.pir
Expand Up @@ -44,6 +44,8 @@ in reverse order of longest regex name.
(tokrx, toklen) = self.'!protoregex_gen_tokrx'(prototable, name)
have_tokrx:
unless tokrx goto token_fail
.local pmc tokrx_it
tokrx_it = iter tokrx
token_loop:
Expand All @@ -55,6 +57,9 @@ in reverse order of longest regex name.
goto token_loop
token_done:
.return (cur)
token_fail:
.return (0)
.end
Expand Down

0 comments on commit 2188043

Please sign in to comment.