diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2017-08-09 21:03:29 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2017-08-09 21:03:29 +0300 |
commit | e9a95e3295e35e326114dc9c973d36e4a3f64ee2 (patch) | |
tree | 8428d03f5312be8dddd558b2a4fcaf8ca910d287 /str_array.c | |
parent | dad18227724e6c1dd4cc154fc8ee2efa2af33e38 (diff) | |
parent | c51a97fc72b732d19dbc83a7a4aadf9893a92b78 (diff) | |
download | egawk-e9a95e3295e35e326114dc9c973d36e4a3f64ee2.tar.gz egawk-e9a95e3295e35e326114dc9c973d36e4a3f64ee2.tar.bz2 egawk-e9a95e3295e35e326114dc9c973d36e4a3f64ee2.zip |
Merge branch 'master' into feature/fix-comments
Diffstat (limited to 'str_array.c')
-rw-r--r-- | str_array.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/str_array.c b/str_array.c index 55e90497..8d6d2b01 100644 --- a/str_array.c +++ b/str_array.c @@ -165,8 +165,13 @@ str_lookup(NODE *symbol, NODE *subs) * "Array indices are always strings." * .... */ - if (subs->stfmt != STFMT_UNUSED) { - /* The string was generated using CONVFMT. */ + // Special cases: + // 1. The string was generated using CONVFMT. + // 2. The string was from an unassigned variable. + // 3. The string was from an unassigned field. + if ( subs->stfmt != STFMT_UNUSED + || subs == Nnull_string + || (subs->flags & NULL_FIELD) != 0) { NODE *tmp; /* |