aboutsummaryrefslogtreecommitdiffstats
path: root/builtin.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin.c')
-rw-r--r--builtin.c4
1 files changed, 3 insertions, 1 deletions
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);
}