From b12840715938e9a18eaa563b1eb096ad63705bee Mon Sep 17 00:00:00 2001 From: csoler Date: Mon, 8 Apr 2019 14:32:13 +0200 Subject: [PATCH] fixed rare bug in chat notify that appeared when your nickname is happenned at the end of the text --- retroshare-gui/src/gui/chat/ChatLobbyUserNotify.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/retroshare-gui/src/gui/chat/ChatLobbyUserNotify.cpp b/retroshare-gui/src/gui/chat/ChatLobbyUserNotify.cpp index 0b989ee2c..81cb47846 100644 --- a/retroshare-gui/src/gui/chat/ChatLobbyUserNotify.cpp +++ b/retroshare-gui/src/gui/chat/ChatLobbyUserNotify.cpp @@ -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);