From ff2cd4018a0f664178ecc7bf4fec986d68e0d5ec Mon Sep 17 00:00:00 2001 From: terencehill Date: Wed, 3 Jul 2024 12:19:24 +0200 Subject: [PATCH] Fix serious issues when a lot of (more than 64) intrusive list are spawned --- qcsrc/lib/intrusivelist.qh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.39.2