summaryrefslogtreecommitdiff
path: root/src/core/cs_set.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/cs_set.c')
-rw-r--r--src/core/cs_set.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/cs_set.c b/src/core/cs_set.c
index f9426b510..76ec975b8 100644
--- a/src/core/cs_set.c
+++ b/src/core/cs_set.c
@@ -464,8 +464,8 @@ class CommandCSSet : public Command
int i;
ChanAccess *access;
- for (access = ci->access, i = 0; i < ci->accesscount;
- access++, i++) {
+ for (i = 0; i < ci->access.size(); i++) {
+ access = ci->GetAccess(i);
if (!access->in_use)
continue;
/* This will probably cause wrong levels to be set, but hey,
@@ -490,6 +490,9 @@ class CommandCSSet : public Command
}
}
+ /* The above may have set an access entry to not be in use, this will clean that up. */
+ ci->CleanAccess();
+
reset_levels(ci);
ci->flags |= CI_XOP;
}