Don't highlight us if we have no name

This commit is contained in:
def 2021-01-28 15:36:30 +01:00
parent f08812b06a
commit af8b306dfb

View file

@ -558,7 +558,7 @@ bool CChat::LineShouldHighlight(const char *pLine, const char *pName)
{
int Length = str_length(pName);
if((pLine == pHL || pHL[-1] == ' ') && (pHL[Length] == 0 || pHL[Length] == ' ' || pHL[Length] == '.' || pHL[Length] == '!' || pHL[Length] == ',' || pHL[Length] == '?' || pHL[Length] == ':'))
if(Length > 0 && (pLine == pHL || pHL[-1] == ' ') && (pHL[Length] == 0 || pHL[Length] == ' ' || pHL[Length] == '.' || pHL[Length] == '!' || pHL[Length] == ',' || pHL[Length] == '?' || pHL[Length] == ':'))
return true;
}