diff options
author | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2016-07-06 22:29:58 -0400 |
---|---|---|
committer | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2016-07-06 22:29:58 -0400 |
commit | eb261daff5e9a96f294cd806d1fd3e68f06fdbaa (patch) | |
tree | 5f4d05861ac492c52a9f6a0781c69e90be73b60c /builtin.c | |
parent | ce342a04922797cb53557178c54d32c4efafda16 (diff) | |
download | egawk-eb261daff5e9a96f294cd806d1fd3e68f06fdbaa.tar.gz egawk-eb261daff5e9a96f294cd806d1fd3e68f06fdbaa.tar.bz2 egawk-eb261daff5e9a96f294cd806d1fd3e68f06fdbaa.zip |
Modify MAYBE_NUM usage and typeof function to return "strnum" only for actual numeric strings.
Diffstat (limited to 'builtin.c')
-rw-r--r-- | builtin.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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: |