diff options
Diffstat (limited to 'Src')
-rw-r--r-- | Src/params.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Src/params.c b/Src/params.c index 00f43e47d..de151a4cd 100644 --- a/Src/params.c +++ b/Src/params.c @@ -3312,9 +3312,12 @@ arrhashsetfn(Param pm, char **val, int augment) zerr("bad set of key/value pairs for associative array"); return; } - if (alen) - if (!(augment && (ht = paramtab = pm->gsu.h->getfn(pm)))) - ht = paramtab = newparamtable(17, pm->node.nam); + if (augment) { + ht = paramtab = pm->gsu.h->getfn(pm); + } + if (alen && (!augment || !paramtab)) { + ht = paramtab = newparamtable(17, pm->node.nam); + } while (*aptr) { /* The parameter name is ztrdup'd... */ v->pm = createparam(*aptr, PM_SCALAR|PM_UNSET); |