diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | gawkapi.c | 5 |
2 files changed, 10 insertions, 1 deletions
@@ -1,3 +1,9 @@ +2014-11-09 Andrew J. Schorr <aschorr@telemetry-investments.com> + + * gawkapi.c (node_to_awk_value): When the type wanted is AWK_UNDEFINED + and a it's a Node_val set to Nnull_string, return AWK_UNDEFINED instead + of AWK_NUMBER 0. + 2014-11-03 Norihiro Tanaka <noritnk@kcn.ne.jp> * re.c (research): Use dfa superset to improve matching speed. @@ -441,7 +441,10 @@ 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 */ - if ((node->flags & NUMBER) != 0) { + if (node == Nnull_string) { + val->val_type = AWK_UNDEFINED; + ret = awk_true; + } else if ((node->flags & NUMBER) != 0) { val->val_type = AWK_NUMBER; val->num_value = get_number_d(node); ret = awk_true; |