Core/Chat: Add a missing terminator check

(cherry picked from commit bf6082a835)
This commit is contained in:
Treeston
2018-09-17 01:24:14 +02:00
committed by Shauren
parent c10ea61491
commit 127c9e5014

View File

@@ -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;