chmode: stop processing when too many modes
This commit is contained in:
parent
c7496b6fb7
commit
b9a7173ab5
1 changed files with 2 additions and 2 deletions
|
@ -1360,13 +1360,13 @@ set_channel_mode(struct Client *client_p, struct Client *source_p,
|
|||
char mode;
|
||||
};
|
||||
|
||||
static struct modeset modesets[MAXPARA];
|
||||
static struct modeset modesets[MAXMODEPARAMS + MAXMODES_SIMPLE];
|
||||
struct modeset *ms = modesets, *mend;
|
||||
char canon_op = '\0';
|
||||
|
||||
mbuf = modebuf;
|
||||
|
||||
for (ml = parv[0]; *ml != 0; ml++)
|
||||
for (ml = parv[0]; *ml != 0 && ms - modesets < ARRAY_SIZE(modesets); ml++)
|
||||
{
|
||||
c = *ml;
|
||||
switch (c)
|
||||
|
|
Loading…
Reference in a new issue