aboutsummaryrefslogtreecommitdiffstats
path: root/str_array.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2017-08-09 21:02:45 +0300
committerArnold D. Robbins <arnold@skeeve.com>2017-08-09 21:02:45 +0300
commit63e02ea9ae9921a45d36ab631fa31593cf149370 (patch)
tree1c2cef3799d90835a14fc85693c2d110a67f657e /str_array.c
parent45ec9a480a99df0242bcf22785528445a3675931 (diff)
parentc51a97fc72b732d19dbc83a7a4aadf9893a92b78 (diff)
downloadegawk-63e02ea9ae9921a45d36ab631fa31593cf149370.tar.gz
egawk-63e02ea9ae9921a45d36ab631fa31593cf149370.tar.bz2
egawk-63e02ea9ae9921a45d36ab631fa31593cf149370.zip
Merge branch 'master' into feature/api-mpfr
Diffstat (limited to 'str_array.c')
-rw-r--r--str_array.c9
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;
/*