aboutsummaryrefslogtreecommitdiffstats
path: root/builtin.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin.c')
-rw-r--r--builtin.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/builtin.c b/builtin.c
index 67424663..0163b81c 100644
--- a/builtin.c
+++ b/builtin.c
@@ -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) {