]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix serious issues when a lot of (more than 64) intrusive list are spawned
authorterencehill <piuntn@gmail.com>
Wed, 3 Jul 2024 10:19:24 +0000 (12:19 +0200)
committerterencehill <piuntn@gmail.com>
Wed, 3 Jul 2024 10:19:24 +0000 (12:19 +0200)
qcsrc/lib/intrusivelist.qh

index 385f7b3b13282edb9deb40f0252d679923f3c8ff..4d28a291798d3eef525c2c1352f92681543fa641 100644 (file)
@@ -223,8 +223,8 @@ void IL_INIT(IntrusiveList this)
                if (idx >= IL_MAX) idx -= IL_MAX;
                int id = idx;
                idx *= 2;
-               if (!il_links[idx]) {
-                       il_links[idx] = this;
+               if (!il_links[id]) {
+                       il_links[id] = this;
                        nextfld = il_links_flds[idx + 0];
                        prevfld = il_links_flds[idx + 1];
                        this.il_id = id;