summaryrefslogtreecommitdiff
path: root/Src/subst.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2010-10-22 16:32:36 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2010-10-22 16:32:36 +0000
commit3f3d80c394134cae020c49420917eb34a456ff68 (patch)
treeebf7140e93ee7fc2ea64a8843b2f770244e35ddf /Src/subst.c
parent91564ce04c65576540a76612f6b292c9d574049f (diff)
downloadzsh-3f3d80c394134cae020c49420917eb34a456ff68.tar.gz
zsh-3f3d80c394134cae020c49420917eb34a456ff68.zip
28360: NO_UNSET option should check parameters with trailing options
Diffstat (limited to 'Src/subst.c')
-rw-r--r--Src/subst.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/Src/subst.c b/Src/subst.c
index cace51e8c..5f65945a5 100644
--- a/Src/subst.c
+++ b/Src/subst.c
@@ -2649,8 +2649,14 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int ssub)
}
getmatcharr(&aval, s, flags, flnum, replstr);
} else {
- if (vunset)
+ if (vunset) {
+ if (unset(UNSET)) {
+ *idend = '\0';
+ zerr("%s: parameter not set", idbeg);
+ return NULL;
+ }
val = dupstring("");
+ }
if (!copied) {
val = dupstring(val);
copied = 1;