diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2016-07-23 21:59:40 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2016-07-23 21:59:40 +0300 |
commit | 140a4a886edc231f1c5f02c6cd4c82effe58139e (patch) | |
tree | 9b190ba921577201d6379cf73f81305d2d7990f8 /builtin.c | |
parent | 2a92e9d3cb8ba907376837dadd03abc6ad09b741 (diff) | |
download | egawk-140a4a886edc231f1c5f02c6cd4c82effe58139e.tar.gz egawk-140a4a886edc231f1c5f02c6cd4c82effe58139e.tar.bz2 egawk-140a4a886edc231f1c5f02c6cd4c82effe58139e.zip |
Fix do_print for use with strnums.
Diffstat (limited to 'builtin.c')
-rw-r--r-- | builtin.c | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -2179,12 +2179,8 @@ do_print(int nargs, int redirtype) fatal(_("attempt to use array `%s' in a scalar context"), array_vname(tmp)); } - if ((tmp->flags & (NUMBER|STRING)) == NUMBER) { - if (OFMTidx == CONVFMTidx) - args_array[i] = force_string(tmp); - else - args_array[i] = format_val(OFMT, OFMTidx, tmp); - } + if ((tmp->flags & STRCUR) == 0 || (tmp->stfmt != -1 && tmp->stfmt != OFMTidx)) + args_array[i] = format_val(OFMT, OFMTidx, tmp); } if (redir_exp != NULL) { |