There are two overloadings of Next. One is a selector function to return the
next node in the current bucket, the other navigates to the next element in the
container. The implementation of Generic_Iteration needs to call the former, as
it interrogates the items in each bucket, before moving on the next bucket.
Tested on x86_64-pc-linux-gnu, committed on trunk

2011-08-29  Matthew Heaney  <hea...@adacore.com>

        * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.

Index: a-chtgbo.adb
===================================================================
--- a-chtgbo.adb        (revision 178228)
+++ a-chtgbo.adb        (working copy)
@@ -350,7 +350,7 @@
          Node := HT.Buckets (Indx);
          while Node /= 0 loop
             Process (Node);
-            Node := Next (HT, Node);
+            Node := Next (HT.Nodes (Node));
          end loop;
       end loop;
    end Generic_Iteration;

Reply via email to