summaryrefslogtreecommitdiff
path: root/builtin.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin.c')
-rw-r--r--builtin.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/builtin.c b/builtin.c
index 3a38a478..30795406 100644
--- a/builtin.c
+++ b/builtin.c
@@ -3,7 +3,7 @@
*/
/*
- * Copyright (C) 1986, 1988, 1989, 1991-2021,
+ * Copyright (C) 1986, 1988, 1989, 1991-2022,
* the Free Software Foundation, Inc.
*
* This file is part of GAWK, the GNU implementation of the
@@ -591,7 +591,7 @@ do_length(int nargs)
size = assoc_length(tmp);
return make_number(size);
- } else if (tmp->type == Node_var_new) {
+ } else if (tmp->type == Node_var_new || tmp->type == Node_elem_new) {
// this can happen from an indirect call
DEREF(tmp);
tmp = dupnode(Nnull_string);
@@ -4342,6 +4342,7 @@ do_typeof(int nargs)
}
break;
case Node_var_new:
+ case Node_elem_new:
res = "untyped";
deref = false;
break;