summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYehonal <yehonal.azeroth@gmail.com>2016-08-23 14:23:53 +0200
committerYehonal <yehonal.azeroth@gmail.com>2016-08-23 14:23:53 +0200
commita04f5a0798d7af415c18bb73c603b98776c76851 (patch)
treef69cbefec51b43f423b3c8a9c6c68762cdd38d80 /src
parent5fa9ed6f28cd00a8d251f35ce821e5d7b7a5ef5e (diff)
parent7117af1d7065ca1e35a54354f520a31d70fc271f (diff)
Merge branch 'master' of github.com:azerothcore/azerothcore-wotlk
Diffstat (limited to 'src')
-rw-r--r--src/game/Chat/Chat.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/game/Chat/Chat.cpp b/src/game/Chat/Chat.cpp
index 432fa19c97..34946bc92e 100644
--- a/src/game/Chat/Chat.cpp
+++ b/src/game/Chat/Chat.cpp
@@ -136,7 +136,7 @@ bool ChatHandler::hasStringAbbr(const char* name, const char* part)
if (!*part)
return false;
- for (;;)
+ while (true)
{
if (!*part)
return true;
@@ -246,7 +246,6 @@ bool ChatHandler::ExecuteCommandInTable(std::vector<ChatCommand> const& table, c
for (uint32 i = 0; i < table.size(); ++i)
{
- // for data fill use full explicit command names
if (table[i].Name == nullptr)
continue;
@@ -258,6 +257,9 @@ bool ChatHandler::ExecuteCommandInTable(std::vector<ChatCommand> const& table, c
{
for (uint32 j = 0; j < table.size(); ++j)
{
+ if (table[j].Name == nullptr)
+ continue;
+
if (!hasStringAbbr(table[j].Name, cmd.c_str()))
continue;
@@ -268,7 +270,6 @@ bool ChatHandler::ExecuteCommandInTable(std::vector<ChatCommand> const& table, c
}
}
}
-
if (match)
continue;