summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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;