diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | eval.c | 2 | ||||
-rw-r--r-- | int_array.c | 1 |
3 files changed, 9 insertions, 0 deletions
@@ -1,3 +1,9 @@ +2012-11-10 John Haque <j.eh@mchsi.com> + + * int_array.c (int_copy): Initialize next pointer of newchain to null. + * eval.c (eval_condition): Force string context for an integer used + as array index. + 2012-11-10 Arnold D. Robbins <arnold@skeeve.com> * gawkapi.c (api_add_ext_func, api_awk_atexit, api_clear_array, @@ -1498,6 +1498,8 @@ eval_condition(NODE *t) if ((t->flags & MAYBE_NUM) != 0) force_number(t); + else if ((t->flags & INTIND) != 0) + force_string(t); if ((t->flags & NUMBER) != 0) return ! iszero(t); diff --git a/int_array.c b/int_array.c index 4e1ff2b1..a2c9e41e 100644 --- a/int_array.c +++ b/int_array.c @@ -398,6 +398,7 @@ int_copy(NODE *symbol, NODE *newsymb) ) { getbucket(newchain); newchain->aicount = chain->aicount; + newchain->ainext = NULL; for (j = 0; j < chain->aicount; j++) { NODE *oldval; |