* 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
|
// found the prefix, remove it to perform spellname validation below
|
||||||
// -2 = strlen(": ")
|
// -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);
|
memmove(buffer, buffer + skillLineNameLength + 2, spellNameLength + 1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user