fixed rare bug in chat notify that appeared when your nickname is happenned at the end of the text

This commit is contained in:
csoler 2019-04-08 14:32:13 +02:00
parent da088746de
commit b128407159

View File

@ -291,7 +291,7 @@ bool ChatLobbyUserNotify::checkWord(QString message, QString word)
&& (!word.isEmpty())) {
QString eow=" ~!@#$%^&*()_+{}|:\"<>?,./;'[]\\-="; // end of word
bool bFirstCharEOW = (nFound==0)?true:(eow.indexOf(message.at(nFound-1)) != -1);
bool bLastCharEOW = ((nFound+word.length()-1) < message.length())
bool bLastCharEOW = (nFound+word.length() < message.length())
?(eow.indexOf(message.at(nFound+word.length())) != -1)
:true;
bFound = (bFirstCharEOW && bLastCharEOW);