From: terencehill Date: Wed, 3 Jul 2024 10:19:24 +0000 (+0200) Subject: Fix serious issues when a lot of (more than 64) intrusive list are spawned X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ff2cd4018a0f664178ecc7bf4fec986d68e0d5ec;p=xonotic%2Fxonotic-data.pk3dir.git Fix serious issues when a lot of (more than 64) intrusive list are spawned --- diff --git a/qcsrc/lib/intrusivelist.qh b/qcsrc/lib/intrusivelist.qh index 385f7b3b1..4d28a2917 100644 --- a/qcsrc/lib/intrusivelist.qh +++ b/qcsrc/lib/intrusivelist.qh @@ -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;