aboutsummaryrefslogtreecommitdiff
path: root/src/game/Chat.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Chat.cpp')
-rw-r--r--src/game/Chat.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game/Chat.cpp b/src/game/Chat.cpp
index 1ade86026fa..ff16e2d6e18 100644
--- a/src/game/Chat.cpp
+++ b/src/game/Chat.cpp
@@ -633,7 +633,7 @@ bool ChatHandler::ExecuteCommandInTable(ChatCommand *table, const char* text, st
for(uint32 i = 0; table[i].Name != NULL; i++)
{
- if( *subcmd && !hasStringAbbr(table[i].Name, subcmd))
+ if( !hasStringAbbr(table[i].Name, cmd.c_str()) )
continue;
// select subcommand from child commands list
@@ -721,7 +721,7 @@ bool ChatHandler::ShowHelpForSubCommands(ChatCommand *table, char const* cmd, ch
if(m_session->GetSecurity() < table[i].SecurityLevel)
continue;
- if( !hasStringAbbr(table[i].Name, subcmd) )
+ if( *subcmd && !hasStringAbbr(table[i].Name, subcmd))
continue;
(list += "\n ") += table[i].Name;