QTfrontend/game.cpp
changeset 660 7c155e849602
parent 622 cedd47d956ec
child 673 bd82104a28af
--- a/QTfrontend/game.cpp	Fri Dec 14 15:36:00 2007 +0000
+++ b/QTfrontend/game.cpp	Fri Dec 14 16:13:35 2007 +0000
@@ -183,7 +183,8 @@
 			break;
 		}
 		case 'E': {
-			emit ErrorMessage(QString().append(msg.mid(2)).left(msg.size() - 6));
+			int size = msg.size();
+			emit ErrorMessage(QString().append(msg.mid(2)).left(size - 4));
 			return;
 		}
 		case 'K': {
@@ -206,7 +207,8 @@
 			break;
 		}
 		case 'i': {
-			emit GameStats(msg.at(2), QString::fromUtf8(msg.mid(3)));
+			int size = msg.size();
+			emit GameStats(msg.at(2), QString::fromUtf8(msg.mid(3).left(size - 5)));
 			break;
 		}
 		case 'Q': {