diff -r 5e7d66230067 -r c84223511ca8 QTfrontend/hwmap.cpp --- a/QTfrontend/hwmap.cpp Sat Feb 14 16:23:51 2009 +0000 +++ b/QTfrontend/hwmap.cpp Sat Feb 14 16:24:20 2009 +0000 @@ -17,7 +17,7 @@ #include "hwconsts.h" #include "hwmap.h" - + #include HWMap::HWMap() : TCPBase(false) { @@ -44,9 +44,14 @@ void HWMap::onClientDisconnect() { - QImage im((uchar*)(readbuffer.constData()), 256, 128, QImage::Format_Mono); - im.setNumColors(2); - emit ImageReceived(im); + if (readbuffer.size() == 128 * 32 + 1) + { + quint8 *buf = (quint8*) readbuffer.constData(); + QImage im(buf, 256, 128, QImage::Format_Mono); + im.setNumColors(2); + emit HHLimitReceived(buf[128 * 32 + 1]); + emit ImageReceived(im); + } } void HWMap::SendToClientFirst()