diff --git a/src/server/game/Chat/ChatLink.cpp b/src/server/game/Chat/ChatLink.cpp index 296115fef..6a36a7ecb 100644 --- a/src/server/game/Chat/ChatLink.cpp +++ b/src/server/game/Chat/ChatLink.cpp @@ -333,7 +333,7 @@ bool SpellChatLink::ValidateName(char* buffer, const char* context) { // found the prefix, remove it to perform spellname validation below // -2 = strlen(": ") - uint32 spellNameLength = strlen(buffer) - skillLineNameLength - 2; + uint32 spellNameLength = (strlen(buffer) <= skillLineNameLength + 2) ? 0 : strlen(buffer) - skillLineNameLength - 2; memmove(buffer, buffer + skillLineNameLength + 2, spellNameLength + 1); break; }