aboutsummaryrefslogtreecommitdiffstats
path: root/awkgram.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2011-05-04 23:05:28 +0300
committerArnold D. Robbins <arnold@skeeve.com>2011-05-04 23:05:28 +0300
commite7dced088c226280bcb1edb252011d6c186504e4 (patch)
tree868eabc52db1e4a08e1385868e1a56062e74ea40 /awkgram.c
parent19093d5a231421594788d633e811859276d8f92f (diff)
downloadegawk-e7dced088c226280bcb1edb252011d6c186504e4.tar.gz
egawk-e7dced088c226280bcb1edb252011d6c186504e4.tar.bz2
egawk-e7dced088c226280bcb1edb252011d6c186504e4.zip
Fix problem with subarray of deleted array.
Diffstat (limited to 'awkgram.c')
-rw-r--r--awkgram.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/awkgram.c b/awkgram.c
index 9b56293e..09628406 100644
--- a/awkgram.c
+++ b/awkgram.c
@@ -3005,7 +3005,7 @@ regular_loop:
char *arr = (yyvsp[(2) - (4)])->lextok;
(yyvsp[(2) - (4)])->opcode = Op_push_array;
- (yyvsp[(2) - (4)])->memory = variable(arr, Node_var_array);
+ (yyvsp[(2) - (4)])->memory = variable(arr, Node_var_new);
if ((yyvsp[(4) - (4)]) == NULL) {
static short warned = FALSE;
@@ -3044,7 +3044,7 @@ regular_loop:
error_ln((yyvsp[(1) - (4)])->source_line,
_("`delete array' is a gawk extension"));
}
- (yyvsp[(3) - (4)])->memory = variable(arr, Node_var_array);
+ (yyvsp[(3) - (4)])->memory = variable(arr, Node_var_new);
(yyvsp[(3) - (4)])->opcode = Op_push_array;
(yyvsp[(1) - (4)])->expr_count = 0;
(yyval) = list_append(list_create((yyvsp[(3) - (4)])), (yyvsp[(1) - (4)]));
@@ -4115,7 +4115,7 @@ regular_loop:
char *arr = (yyvsp[(1) - (2)])->lextok;
if ((n = lookup(arr)) != NULL && ! isarray(n))
yyerror(_("use of non-array as array"));
- (yyvsp[(1) - (2)])->memory = variable(arr, Node_var_array);
+ (yyvsp[(1) - (2)])->memory = variable(arr, Node_var_new);
(yyvsp[(1) - (2)])->opcode = Op_push_array;
(yyval) = list_prepend((yyvsp[(2) - (2)]), (yyvsp[(1) - (2)]));
}
@@ -6219,6 +6219,7 @@ mk_symbol(NODETYPE type, NODE *value)
r->flags = MALLOC;
r->lnode = value;
r->rnode = NULL;
+ r->parent_array = NULL;
r->var_assign = (Func_ptr) 0;
return r;
}