diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2010-10-22 16:32:36 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2010-10-22 16:32:36 +0000 |
commit | 3f3d80c394134cae020c49420917eb34a456ff68 (patch) | |
tree | ebf7140e93ee7fc2ea64a8843b2f770244e35ddf /Src | |
parent | 91564ce04c65576540a76612f6b292c9d574049f (diff) | |
download | zsh-3f3d80c394134cae020c49420917eb34a456ff68.tar.gz zsh-3f3d80c394134cae020c49420917eb34a456ff68.tar.xz zsh-3f3d80c394134cae020c49420917eb34a456ff68.zip |
28360: NO_UNSET option should check parameters with trailing options
Diffstat (limited to 'Src')
-rw-r--r-- | Src/subst.c | 8 |
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; |