aboutsummaryrefslogtreecommitdiffstats
path: root/builtin.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin.c')
-rw-r--r--builtin.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/builtin.c b/builtin.c
index 08ce3273..a0b6e79f 100644
--- a/builtin.c
+++ b/builtin.c
@@ -2202,13 +2202,11 @@ do_print(int nargs, int redirtype)
}
if (tmp->type == Node_typedregex)
- args_array[i] = force_string(tmp);
- else if ((fixtype(tmp)->flags & (NUMBER|STRING)) == NUMBER) {
- if (OFMTidx == CONVFMTidx)
- args_array[i] = force_string(tmp);
- else
- args_array[i] = format_val(OFMT, OFMTidx, tmp);
- }
+ args_array[i] = force_string(tmp);
+ else if ((fixtype(tmp)->flags & (NUMBER|STRING)) == NUMBER &&
+ !((tmp->flags & STRCUR) != 0
+ && (tmp->stfmt == -1 || tmp->stfmt == OFMTidx)))
+ args_array[i] = format_val(OFMT, OFMTidx, tmp);
}
if (redir_exp != NULL) {