]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
com_list.h: Fix copy/paste oversight where List_For_Each_Entry went backwards like...
authorCloudwalk <cloudwalk009@gmail.com>
Tue, 8 Jun 2021 12:18:36 +0000 (08:18 -0400)
committerCloudwalk <cloudwalk009@gmail.com>
Tue, 8 Jun 2021 12:18:36 +0000 (08:18 -0400)
com_list.h

index da4f3a79d9ebea846d93ad8de44daa99418da97f..188f8d54d0cf6bea204df6b59db1ee2165492a20 100644 (file)
@@ -117,9 +117,9 @@ typedef struct llist_s
  * Iterate over a list of a given type
  */
 #define List_For_Each_Entry(pos, head, member) \
-       for (pos = List_Last_Entry(head, Q_typeof(*pos), member); \
+       for (pos = List_First_Entry(head, Q_typeof(*pos), member); \
             !List_Entry_Is_Head(pos, head, member); \
-            pos = List_Prev_Entry(pos, member))
+            pos = List_Next_Entry(pos, member))
 
 /*
  * Iterate over a list of a given type backwards