summaryrefslogtreecommitdiff
path: root/builtin.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin.c')
-rw-r--r--builtin.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin.c b/builtin.c
index a21df18e..032f0ec7 100644
--- a/builtin.c
+++ b/builtin.c
@@ -3951,14 +3951,14 @@ do_typeof(int nargs)
break;
case Node_val:
case Node_var:
- switch (arg->flags & (STRING|NUMBER|MAYBE_NUM)) {
+ switch (fixtype(arg)->flags & (STRING|NUMBER|MAYBE_NUM)) {
case STRING:
res = "string";
break;
case NUMBER:
res = "number";
break;
- case STRING|MAYBE_NUM:
+ case NUMBER|MAYBE_NUM:
res = "strnum";
break;
case NUMBER|STRING: