bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gawk] bug related to hash function


From: Aharon Robbins
Subject: Re: [bug-gawk] bug related to hash function
Date: Mon, 09 May 2016 20:56:33 +0300
User-agent: s-nail v14.8.6

[ Resent with correct bug address. ]

Hi.

I have fixed the problem. Patch below.

I have no clue why this only manifests in 4.1.0 forward.

May I add your test program and a few lines from the data file to
the test suite?

Thanks,

Arnold
---------------------------------
diff --git a/str_array.c b/str_array.c
index 2ffa5df..c122ab9 100644
--- a/str_array.c
+++ b/str_array.c
@@ -187,6 +187,15 @@ str_lookup(NODE *symbol, NODE *subs)
                subs = dupnode(subs);
        }
 
+       /*
+        * Repeat after me: "Array indices are always strings."
+        * "Array indices are always strings."
+        * "Array indices are always strings."
+        * "Array indices are always strings."
+        * ....
+        */
+       subs->flags &= ~MAYBE_NUM;
+
        getbucket(b);
        b->ahnext = symbol->buckets[hash1];
        symbol->buckets[hash1] = b;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]