aboutsummaryrefslogtreecommitdiff
path: root/src/libregexp/rregsub.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libregexp/rregsub.c')
-rw-r--r--src/libregexp/rregsub.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/libregexp/rregsub.c b/src/libregexp/rregsub.c
index 5a4a564d..8b3e9738 100644
--- a/src/libregexp/rregsub.c
+++ b/src/libregexp/rregsub.c
@@ -27,7 +27,7 @@ rregsub(Rune *sp, /* source string */
case '8':
case '9':
i = *sp-'0';
- if(mp[i].s.rsp != 0 && mp!=0 && ms>i)
+ if(mp!=0 && mp[i].s.rsp != 0 && ms>i)
for(ssp = mp[i].s.rsp;
ssp < mp[i].e.rep;
ssp++)
@@ -46,9 +46,8 @@ rregsub(Rune *sp, /* source string */
*dp++ = *sp;
break;
}
- }else if(*sp == '&'){
- if(mp[0].s.rsp != 0 && mp!=0 && ms>0)
- if(mp[0].s.rsp != 0)
+ }else if(*sp == '&'){
+ if(mp!=0 && mp[0].s.rsp != 0 && ms>0)
for(ssp = mp[0].s.rsp;
ssp < mp[0].e.rep; ssp++)
if(dp < ep)