diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Src/params.c | 2 | ||||
-rw-r--r-- | Test/D04parameter.ztst | 8 |
3 files changed, 14 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog index 28f70f48a..5b3ace6a9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2018-08-09 Peter Stephenson <p.stephenson@samsung.com> + + * 43264: Src/params.c, Test/D04parameter.ztst: + ${+assoc[nonexistent]} returned 1 with KSH_ARRAYS. + 2018-08-08 Peter Stephenson <p.stephenson@samsung.com> * 43261: Src/math.c, Test/C01arith.ztst: Apply unary minus to diff --git a/Src/params.c b/Src/params.c index f13093403..a1c299f60 100644 --- a/Src/params.c +++ b/Src/params.c @@ -1427,7 +1427,7 @@ getarg(char **str, int *inv, Value v, int a2, zlong *w, HashTable ht = v->pm->gsu.h->getfn(v->pm); if (!ht) { if (flags & SCANPM_CHECKING) - return isset(KSHARRAYS) ? 1 : 0; + return 0; ht = newparamtable(17, v->pm->node.nam); v->pm->gsu.h->setfn(v->pm, ht); } diff --git a/Test/D04parameter.ztst b/Test/D04parameter.ztst index 3b187f492..e327a784c 100644 --- a/Test/D04parameter.ztst +++ b/Test/D04parameter.ztst @@ -2422,3 +2422,11 @@ F:behavior, see http://austingroupbugs.net/view.php?id=888 >: # >: ` backtick >: word + + ( + setopt KSH_ARRAYS + typeset -A ksh_assoc + print ${+assoc[unset]} + ) +0:Use of parameter subst + to test element of hash with KSH_ARRAYS. +>0 |