From Bugreport: cannot delete characters after clicking on player name in lobby

https://forum.megaglest.org/index.php?topic=9302.0
This commit is contained in:
titiger 2013-12-10 01:52:08 +01:00
parent dcada00514
commit 3bc5901a01

View File

@ -428,8 +428,11 @@ void ChatManager::updateAutoCompleteBuffer() {
void ChatManager::addText(string text) {
int maxTextLenAllowed = (customCB != NULL ? this->maxCustomTextLength : maxTextLenght);
if(editEnabled && (int)text.size() + (int)this->text.size() < maxTextLenAllowed) {
if(editEnabled && (int)text.size() + (int)this->text.size() <= maxTextLenAllowed) {
this->text += text;
for(int i= 0; i<(int)text.size() ; i++){
textCharLength.push_back(1);
}
}
}