diff options
Diffstat (limited to 'Src/subst.c')
-rw-r--r-- | Src/subst.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Src/subst.c b/Src/subst.c index 66c363145..2e9b84718 100644 --- a/Src/subst.c +++ b/Src/subst.c @@ -999,11 +999,12 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int ssub) if (!(v = fetchvalue((subexp ? &ov : &s), (wantt ? -1 : ((unset(KSHARRAYS) || inbrace) ? 1 : -1)), - hkeys|hvals))) + hkeys|hvals)) || + (v->pm && (v->pm->flags & PM_UNSET))) vunset = 1; if (wantt) { - if (v) { + if (v && v->pm && !(v->pm->flags & PM_UNSET)) { int f = v->pm->flags; switch (PM_TYPE(f)) { |