diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2018-01-10 22:09:43 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2018-01-10 22:09:43 +0200 |
commit | 27258ae8aff7bb3acae54f9e30ce93614bbb9590 (patch) | |
tree | 5ad316a23ccade25763125dfdd79b75d36f1edf1 /builtin.c | |
parent | e1231907ef810d6e73a643c50aa29ce6b3fe4947 (diff) | |
parent | 11ef8fd2637da3ad21f2bc803432cadf3451b67a (diff) | |
download | egawk-27258ae8aff7bb3acae54f9e30ce93614bbb9590.tar.gz egawk-27258ae8aff7bb3acae54f9e30ce93614bbb9590.tar.bz2 egawk-27258ae8aff7bb3acae54f9e30ce93614bbb9590.zip |
Merge branch 'gawk-4.2-stable'
Diffstat (limited to 'builtin.c')
-rw-r--r-- | builtin.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -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) { |