fix: devicemsg bug

This commit is contained in:
rankun 2019-09-17 22:55:02 +08:00
commit 7b54990f10

View file

@ -45,6 +45,7 @@ qint32 DeviceMsg::deserialize(QByteArray& byteArray)
m_data.type = (DeviceMsgType)c; m_data.type = (DeviceMsgType)c;
switch (m_data.type) { switch (m_data.type) {
case DMT_GET_CLIPBOARD: { case DMT_GET_CLIPBOARD: {
m_data.clipboardMsg.text = Q_NULLPTR;
quint16 clipboardLen = BufferUtil::read16(buf); quint16 clipboardLen = BufferUtil::read16(buf);
if (clipboardLen > len - 3) { if (clipboardLen > len - 3) {
ret = 0; // not available ret = 0; // not available