mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 02:50:29 +00:00
* Fixed uint32 assignment, prevent crash * Improved code quality
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user