From 8c26b0480d3f83416e6791a0453e3548e139a00f Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Wed, 17 Jan 2018 18:22:05 +0200 Subject: Fix isarray to take unset variable. --- builtin.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'builtin.c') diff --git a/builtin.c b/builtin.c index 54d202d6..6927205c 100644 --- a/builtin.c +++ b/builtin.c @@ -507,7 +507,9 @@ do_isarray(int nargs) tmp = POP(); if (tmp->type != Node_var_array) { ret = 0; - DEREF(tmp); + // could be Node_var_new + if (tmp->type == Node_val) + DEREF(tmp); } return make_number((AWKNUM) ret); } -- cgit v1.2.3