From e0ece893dafdc2316eb5fd9a834475b21abc6959 Mon Sep 17 00:00:00 2001 From: Marcus Comstedt <marcus@mc.pp.se> Date: Sun, 3 Sep 2000 01:52:23 +0200 Subject: [PATCH] Undid faulty "no warnings" transformation. (Fixes [bug 51]) Rev: src/modules/Regexp/pike_regexp.c:1.16 --- src/modules/Regexp/pike_regexp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/Regexp/pike_regexp.c b/src/modules/Regexp/pike_regexp.c index 8c3d21f6ed..05ae9ca621 100644 --- a/src/modules/Regexp/pike_regexp.c +++ b/src/modules/Regexp/pike_regexp.c @@ -1,5 +1,5 @@ /* - * $Id: pike_regexp.c,v 1.15 2000/08/11 13:04:22 grubba Exp $ + * $Id: pike_regexp.c,v 1.16 2000/09/02 23:52:23 marcus Exp $ * * regexp.c - regular expression matching * @@ -984,7 +984,7 @@ char *prog; register char nextch; register size_t no; register char *save; - register int minimum; + register size_t minimum; /* * Lookahead to avoid useless match attempts when we know @@ -995,8 +995,8 @@ char *prog; nextch = *OPERAND(nxt); minimum = (OP(scan) == STAR) ? 0 : 1; save = reginput; - no = regrepeat(OPERAND(scan)) + (minimum == 0); - while (no) { + no = regrepeat(OPERAND(scan)); + while (no >= minimum) { /* If it could work, try it. */ if (nextch == '\0' || *reginput == nextch) if (regmatch(nxt)) -- GitLab