aboutsummaryrefslogtreecommitdiffstats
path: root/str_array.c
diff options
context:
space:
mode:
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;
/*