Fix the foreach in TreeMap.values
authorMaciej Piechotka <uzytkownik2@gmail.com>
Wed, 24 Jul 2013 20:41:22 +0000 (22:41 +0200)
committerMaciej Piechotka <uzytkownik2@gmail.com>
Wed, 24 Jul 2013 20:41:22 +0000 (22:41 +0200)
gee/treemap.vala

index 2d2708a..b957aff 100644 (file)
@@ -1714,7 +1714,7 @@ public class Gee.TreeMap<K,V> : Gee.AbstractBidirSortedMap<K,V> {
 
                public bool foreach (ForallFunc<V> f) {
                        if (current != null) {
-                               if (!f (current.key)) {
+                               if (!f (current.value)) {
                                        return false;
                                }
                                current = current.next;
@@ -1729,7 +1729,7 @@ public class Gee.TreeMap<K,V> : Gee.AbstractBidirSortedMap<K,V> {
                                }
                        }
                        for (; current != null; current = current.next) {
-                               if (!f (current.key)) {
+                               if (!f (current.value)) {
                                        return false;
                                }
                        }