From 18e9e12261fa97aa47daf7d0fb729afd366aa5d6 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sat, 18 May 2024 16:35:14 +0100 Subject: Fix an iterator invalidation issue in cs_set and ns_set. --- modules/chanserv/cs_set.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/chanserv') diff --git a/modules/chanserv/cs_set.cpp b/modules/chanserv/cs_set.cpp index c7952baba..932d1f43c 100644 --- a/modules/chanserv/cs_set.cpp +++ b/modules/chanserv/cs_set.cpp @@ -1146,7 +1146,7 @@ public: if (c->ci && keep_modes.HasExt(c->ci)) { Channel::ModeList ml = c->ci->last_modes; - for (const auto &[last_mode, last_value] : c->ci->last_modes) + for (const auto &[last_mode, last_value] : ml) c->SetMode(c->ci->WhoSends(), last_mode, last_value); } } -- cgit