aboutsummaryrefslogtreecommitdiffstats
path: root/builtin.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2018-01-03 22:28:39 +0200
committerArnold D. Robbins <arnold@skeeve.com>2018-01-03 22:28:39 +0200
commita5f04737b4a5fce89ab7bd9264ba5b4813473121 (patch)
tree1fdc4b049f5eab73b15af306069a52eac110934b /builtin.c
parentc182937de92dc028a12a6c9350773dced1841751 (diff)
downloadegawk-a5f04737b4a5fce89ab7bd9264ba5b4813473121.tar.gz
egawk-a5f04737b4a5fce89ab7bd9264ba5b4813473121.tar.bz2
egawk-a5f04737b4a5fce89ab7bd9264ba5b4813473121.zip
Changes to ROUNDMODE now invalidate cached string values.
Diffstat (limited to 'builtin.c')
-rw-r--r--builtin.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/builtin.c b/builtin.c
index fc948276..54d202d6 100644
--- a/builtin.c
+++ b/builtin.c
@@ -3,7 +3,7 @@
*/
/*
- * Copyright (C) 1986, 1988, 1989, 1991-2017 the Free Software Foundation, Inc.
+ * Copyright (C) 1986, 1988, 1989, 1991-2018 the Free Software Foundation, Inc.
*
* This file is part of GAWK, the GNU implementation of the
* AWK Programming Language.
@@ -2242,10 +2242,9 @@ do_print(int nargs, int redirtype)
DEREF(args_array[i]);
fatal(_("attempt to use array `%s' in a scalar context"), array_vname(tmp));
}
- if ( (tmp->flags & STRCUR) == 0
- || ( tmp->stfmt != STFMT_UNUSED
- && tmp->stfmt != OFMTidx))
- args_array[i] = force_string_ofmt(tmp);
+ // Let force_string_ofmt handle checking if things
+ // are already valid.
+ args_array[i] = force_string_ofmt(tmp);
}
if (redir_exp != NULL) {