summaryrefslogtreecommitdiff
path: root/modules/chanserv/cs_set.cpp
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2024-05-18 16:35:14 +0100
committerSadie Powell <sadie@witchery.services>2024-05-18 16:35:35 +0100
commit18e9e12261fa97aa47daf7d0fb729afd366aa5d6 (patch)
tree4a7721e24e88eb2034c5bfb7831c6407388b9f40 /modules/chanserv/cs_set.cpp
parent9d68b29c9e0d8d31cbe2327daa2889d092cda492 (diff)
Fix an iterator invalidation issue in cs_set and ns_set.
Diffstat (limited to 'modules/chanserv/cs_set.cpp')
-rw-r--r--modules/chanserv/cs_set.cpp2
1 files changed, 1 insertions, 1 deletions
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);
}
}