* Fixed uint32 assignment, prevent crash * Improved code quality
This commit is contained in:
parent
a3206c56dc
commit
293ccc1faf
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue