QTfrontend/proto.cpp
changeset 1360 d3e285281c26
parent 1066 1f1b3686a2b0
child 1485 51c11e77408a
equal deleted inserted replaced
1359:c7703c653865 1360:d3e285281c26
    24 }
    24 }
    25 
    25 
    26 QByteArray & HWProto::addStringToBuffer(QByteArray & buf, const QString & string)
    26 QByteArray & HWProto::addStringToBuffer(QByteArray & buf, const QString & string)
    27 {
    27 {
    28 	QByteArray strmsg = string.toUtf8();
    28 	QByteArray strmsg = string.toUtf8();
       
    29 	strmsg.left(250);
    29 	quint8 sz = strmsg.size();
    30 	quint8 sz = strmsg.size();
    30 	buf.append(QByteArray((char *)&sz, 1));
    31 	buf.append(QByteArray((char *)&sz, 1));
    31 	buf.append(strmsg);
    32 	buf.append(strmsg);
    32 	return buf;
    33 	return buf;
    33 }
    34 }