Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix off-by-two error; JimmyZ_++ spotted it. This means %/%% are in fa…
…ct not yet working. diakopter-- diakopter--
  • Loading branch information
diakopter committed May 27, 2012
1 parent 996ac93 commit d05da7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/QRegex/NFA.nqp
Expand Up @@ -141,7 +141,7 @@ class QRegex::NFA {
# handle only ?,*,+ for now
return self.fate($node, $from, $to) if $max > 1 || $min > 1;

if $max == 1 || ($min == 0 && $max == 1) {
if $max == -1 || ($min == 0 && $max == 1) {
my $st := self.addstate();
self.addedge($from, $st, $EDGE_EPSILON, 0);
self.addedge($from, $to, $EDGE_EPSILON, 0) if $min == 0;
Expand Down

0 comments on commit d05da7c

Please sign in to comment.