From d0bcd0b2c45fb90429b5eb0bbb91fdc43cec654b Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Sun, 16 Dec 2012 18:07:56 +0200 Subject: Minor code and doc cleanups. --- debug.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'debug.c') diff --git a/debug.c b/debug.c index 7dff7b8d..a69b7e3e 100644 --- a/debug.c +++ b/debug.c @@ -1263,7 +1263,9 @@ do_set_var(CMDARG *arg, int cmd ATTRIBUTE_UNUSED) array = make_array(); array->vname = estrdup(subs->stptr, subs->stlen); array->parent_array = r; - *assoc_lookup(r, subs) = array; + lhs = assoc_lookup(r, subs); + unref(*lhs); + *lhs = array; r = array; } else if (value->type != Node_var_array) { d_error(_("attempt to use scalar `%s[\"%s\"]' as array"), -- cgit v1.2.3