From 65628dfdec26a95e207b42a2da9db46e53f73778 Mon Sep 17 00:00:00 2001 From: Adam- Date: Thu, 12 Nov 2009 00:28:09 +0000 Subject: [PATCH] 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 --- src/commands.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }