summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-12-24 20:16:42 -0500
committerAdam <Adam@anope.org>2010-12-24 20:16:42 -0500
commit0f63790b4cb86bd40f6ab7d558907ef463c58dea (patch)
tree1eea9e4af3c0c5ba949d4d91ed9cc658d5887c7e /modules
parent4f6232e6287c7ecf1105bc4154b7b31fe5a00b9d (diff)
Bug #1215 - Fixed crash when /cs set mlock is given an empty string
Diffstat (limited to 'modules')
-rw-r--r--modules/core/cs_set_mlock.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/core/cs_set_mlock.cpp b/modules/core/cs_set_mlock.cpp
index 2556653a2..38e0931e0 100644
--- a/modules/core/cs_set_mlock.cpp
+++ b/modules/core/cs_set_mlock.cpp
@@ -36,7 +36,7 @@ class CommandCSSetMLock : public Command
if (ModeManager::FindChannelModeByName(CMODE_REGISTERED))
ci->SetMLock(CMODE_REGISTERED, true);
- Anope::string modes = params[1];
+ Anope::string modes = params.size() > 1 ? params[1] : "";
for (Anope::string::const_iterator ch = modes.begin(), end = modes.end(); ch != end; ++ch)
{
switch (*ch)