[svn:parrot] r38461 - trunk/src/pmc

NotFound at svn.parrot.org NotFound at svn.parrot.org
Mon May 4 12:46:46 UTC 2009


Author: NotFound
Date: Mon May  4 12:46:44 2009
New Revision: 38461
URL: https://trac.parrot.org/parrot/changeset/38461

Log:
[core] fix off-by-one in orderedhash TT #636 skids++

Modified:
   trunk/src/pmc/orderedhash.pmc

Modified: trunk/src/pmc/orderedhash.pmc
==============================================================================
--- trunk/src/pmc/orderedhash.pmc	Mon May  4 09:55:38 2009	(r38460)
+++ trunk/src/pmc/orderedhash.pmc	Mon May  4 12:46:44 2009	(r38461)
@@ -629,9 +629,10 @@
                 {
                     Hash     * const hash = (Hash *)SELF.get_pointer();
                     IMAGE_IO * const io   = info->image_io;
+                    const UINTVAL entries = hash->entries;
                     UINTVAL i;
 
-                    for (i = 0; i <= hash->entries; i++) {
+                    for (i = 0; i < entries; i++) {
                         HashBucket * const b   = hash->bs + i;
 
                         if (b) {


More information about the parrot-commits mailing list