summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorAndy Dougherty <doughera@lafcol.lafayette.edu>1994-04-04 00:00:00 +0000
committerAndy Dougherty <doughera@lafcol.lafayette.edu>1994-04-04 00:00:00 +0000
commit2304df62caa7d9be70e8b8bcdb454e139c9c103d (patch)
tree98a456ef0fbe59b1a02bfe68afa4a3d9afb4f21c /regexec.c
parent8990e3071044a96302560bbdb5706f3e74cf1bef (diff)
downloadperl-2304df62caa7d9be70e8b8bcdb454e139c9c103d.tar.gz
perl 5.0 alpha 8
[the last one taken from the September '94 InfoMagic CD; a similar style of cleanup as the previous commits was performed]
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/regexec.c b/regexec.c
index 131ad0fe29..2d23d05af4 100644
--- a/regexec.c
+++ b/regexec.c
@@ -432,10 +432,12 @@ I32 safebase; /* no need to remember string in subbase */
prog->subend = strend;
if ((!safebase && (prog->nparens || sawampersand)) || prog->do_folding){
strend += dontbother; /* uncheat */
- if (safebase) /* no need for $digit later */
+ i = strend - string + (stringarg - strbeg);
+ if (safebase) { /* no need for $digit later */
s = strbeg;
+ prog->subend = s+i;
+ }
else if (strbeg != prog->subbase) {
- i = strend - string + (stringarg - strbeg);
s = nsavestr(strbeg,i); /* so $digit will work later */
if (prog->subbase)
Safefree(prog->subbase);
@@ -443,7 +445,6 @@ I32 safebase; /* no need to remember string in subbase */
prog->subend = s+i;
}
else {
- i = strend - string + (stringarg - strbeg);
prog->subbeg = s = prog->subbase;
prog->subend = s+i;
}