diff options
author | Chet Ramey <chet.ramey@case.edu> | 2020-11-17 14:18:49 -0500 |
---|---|---|
committer | Chet Ramey <chet.ramey@case.edu> | 2020-11-17 14:18:49 -0500 |
commit | 37b22abee700eb1b0c5b6926ab32630a429c1183 (patch) | |
tree | 01d22efef9babf0127776b6b3c4387b03dc629ab /test.c | |
parent | 278db80c368700ed6117fbd390c89a9b44c0240c (diff) | |
download | bash-5.1-testing.tar.gz |
Bash-5.1-rc3 releasebash-5.1-rc3bash-5.1-testing
Diffstat (limited to 'test.c')
-rw-r--r-- | test.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -627,8 +627,11 @@ unary_test (op, arg) if (valid_array_reference (arg, 0)) { char *t; - int rtype, ret; - t = array_value (arg, 0, 0, &rtype, (arrayind_t *)0); + int rtype, ret, flags; + + /* Let's assume that this has already been expanded once. */ + flags = assoc_expand_once ? AV_NOEXPAND : 0; + t = array_value (arg, 0, flags, &rtype, (arrayind_t *)0); ret = t ? TRUE : FALSE; if (rtype > 0) /* subscript is * or @ */ free (t); |