QTfrontend/game.cpp
changeset 406 ea90c6358054
parent 397 d9bb21b4400d
child 419 fdeed9718e6b
--- a/QTfrontend/game.cpp	Tue Feb 06 23:22:32 2007 +0000
+++ b/QTfrontend/game.cpp	Wed Feb 07 00:30:25 2007 +0000
@@ -200,7 +200,7 @@
 {
 	quint8 msglen;
 	quint32 bufsize;
-	while (((bufsize = readbuffer.size()) > 0) &&
+	while (!readbuffer.isEmpty() && ((bufsize = readbuffer.size()) > 0) &&
 			((msglen = readbuffer.data()[0]) < bufsize))
 	{
 		QByteArray msg = readbuffer.left(msglen + 1);