summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-11-06 00:05:19 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-11-06 00:05:19 +0000
commit3fa9c3d7aa8741b27feb77e51c8ad467514f66b6 (patch)
tree2a828f9571c8b0e757eb41fa5d8624c804ea280d /regexec.c
parentcf27e83cadf62074789d2433ea86ae71021b0fc9 (diff)
downloadperl-3fa9c3d7aa8741b27feb77e51c8ad467514f66b6.tar.gz
More re debugging.
p4raw-id: //depot/perl@12862
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/regexec.c b/regexec.c
index 98fcb650c3..be2e707096 100644
--- a/regexec.c
+++ b/regexec.c
@@ -1475,10 +1475,18 @@ Perl_regexec_flags(pTHX_ register regexp *prog, char *stringarg, register char *
minlen = prog->minlen;
if (do_utf8 && !(prog->reganch & ROPT_CANY_SEEN)) {
- if (utf8_distance((U8*)strend, (U8*)startpos) < minlen) goto phooey;
+ if (utf8_distance((U8*)strend, (U8*)startpos) < minlen) {
+ DEBUG_r(PerlIO_printf(Perl_debug_log,
+ "Too short (in characters)...\n"));
+ goto phooey;
+ }
}
else {
- if (strend - startpos < minlen) goto phooey;
+ if (strend - startpos < minlen) {
+ DEBUG_r(PerlIO_printf(Perl_debug_log,
+ "Too short (in bytes)...\n"));
+ goto phooey;
+ }
}
/* Check validity of program. */
@@ -1537,8 +1545,10 @@ Perl_regexec_flags(pTHX_ register regexp *prog, char *stringarg, register char *
d.scream_olds = &scream_olds;
d.scream_pos = &scream_pos;
s = re_intuit_start(prog, sv, s, strend, flags, &d);
- if (!s)
+ if (!s) {
+ DEBUG_r(PerlIO_printf(Perl_debug_log, "Not present...\n"));
goto phooey; /* not present */
+ }
}
DEBUG_r({