summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2009-11-12 00:28:09 +0000
committerAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2009-11-12 00:28:09 +0000
commit65628dfdec26a95e207b42a2da9db46e53f73778 (patch)
treef7b79e98f79f7f48a687021925fb36a1529da42a
parent848c0aaa212f6e5e69a30d14e36772ffd2d421c7 (diff)
Fix default OnSyntaxError subcommand to be the last param if its size is less than the minimum required for the command
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2645 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r--src/commands.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/commands.c b/src/commands.c
index 0e548a22d..6398a9b76 100644
--- a/src/commands.c
+++ b/src/commands.c
@@ -105,7 +105,7 @@ void mod_run_cmd(char *service, User * u, CommandHash * cmdTable[], const char *
if (params.size() < c->MinParams)
{
- c->OnSyntaxError(u, params.size() > 1 ? params[1].c_str() : "");
+ c->OnSyntaxError(u, !params.empty() ? params[params.size() - 1] : "");
return;
}