diff options
author | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2016-06-14 15:14:37 -0400 |
---|---|---|
committer | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2016-06-14 15:14:37 -0400 |
commit | e8ba153719506aabfffc911d2519727a3bfc5a36 (patch) | |
tree | c97ee6a4e909431437ed888f1a2e10b151d3056d /gawkapi.c | |
parent | b54c54d30fe20cfb5f0794cd85eeec7783800866 (diff) | |
download | gawk-e8ba153719506aabfffc911d2519727a3bfc5a36.tar.gz |
Fix gawkapi node_to_awk_value to check scalar type correctly.
Diffstat (limited to 'gawkapi.c')
-rw-r--r-- | gawkapi.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -445,6 +445,7 @@ node_to_awk_value(NODE *node, awk_value_t *val, awk_valtype_t wanted) break; case AWK_SCALAR: + fixtype(node); if ((node->flags & NUMBER) != 0) { val->val_type = AWK_NUMBER; } else if ((node->flags & STRING) != 0) { @@ -456,6 +457,7 @@ node_to_awk_value(NODE *node, awk_value_t *val, awk_valtype_t wanted) case AWK_UNDEFINED: /* return true and actual type for request of undefined */ + fixtype(node); if (node == Nnull_string) { val->val_type = AWK_UNDEFINED; ret = awk_true; |