summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--eval.c2
-rw-r--r--int_array.c1
3 files changed, 9 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 58bf10ed..80a0c645 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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,
diff --git a/eval.c b/eval.c
index 4c3e6ab6..36a81493 100644
--- a/eval.c
+++ b/eval.c
@@ -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;