summaryrefslogtreecommitdiff
path: root/Src/subst.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/subst.c')
-rw-r--r--Src/subst.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/Src/subst.c b/Src/subst.c
index dc2052ee0..f37ae935e 100644
--- a/Src/subst.c
+++ b/Src/subst.c
@@ -2003,11 +2003,12 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int pf_flags,
} else /* parse error */
errflag |= ERRFLAG_ERROR;
if (rplytmp && !errflag) {
- int onoerrs = noerrs;
+ int onoerrs = noerrs, rplylen;
noerrs = 2;
- if ((cmdarg = ztuff(rplytmp)))
- setsparam("REPLY", cmdarg);
+ rplylen = zstuff(&cmdarg, rplytmp);
noerrs = onoerrs;
+ if (rplylen >= 0)
+ setsparam("REPLY", metafy(cmdarg, rplylen, META_REALLOC));
}
}