mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Chat: Add a missing terminator check
(cherry picked from commit bf6082a835)
This commit is contained in:
@@ -39,8 +39,12 @@ HyperlinkInfo Trinity::Hyperlinks::ParseHyperlink(char const* pos)
|
||||
return nullptr;
|
||||
uint32 color = 0;
|
||||
for (uint8 i = 0; i < 8; ++i)
|
||||
{
|
||||
if (uint8 hex = toHex(*(pos++)))
|
||||
color = (color << 4) | (hex & 0xf);
|
||||
else
|
||||
return nullptr;
|
||||
}
|
||||
// link data start tag
|
||||
if (*(pos++) != '|' || *(pos++) != 'H')
|
||||
return nullptr;
|
||||
|
||||
Reference in New Issue
Block a user