Commit 6cb829a3 authored by Oliver Wolff's avatar Oliver Wolff
Browse files

winrt: Fixed reading of string attributes in sequences


Change-Id: I063668f9b95b95aa15a736b80e11d81c15cd1730
Reviewed-by: default avatarMaurice Kalinowski <maurice.kalinowski@qt.io>
Showing with 4 additions and 1 deletion
...@@ -427,6 +427,9 @@ QBluetoothServiceInfo::Sequence QWinRTBluetoothServiceDiscoveryWorker::readSeque ...@@ -427,6 +427,9 @@ QBluetoothServiceInfo::Sequence QWinRTBluetoothServiceDiscoveryWorker::readSeque
BYTE length; BYTE length;
hr = dataReader->ReadByte(&length); hr = dataReader->ReadByte(&length);
Q_ASSERT_SUCCEEDED(hr); Q_ASSERT_SUCCEEDED(hr);
remainingLength -= 1;
if (bytesRead)
*bytesRead += 1;
HString value; HString value;
hr = dataReader->ReadString(length, value.GetAddressOf()); hr = dataReader->ReadString(length, value.GetAddressOf());
Q_ASSERT_SUCCEEDED(hr); Q_ASSERT_SUCCEEDED(hr);
...@@ -435,7 +438,7 @@ QBluetoothServiceInfo::Sequence QWinRTBluetoothServiceDiscoveryWorker::readSeque ...@@ -435,7 +438,7 @@ QBluetoothServiceInfo::Sequence QWinRTBluetoothServiceDiscoveryWorker::readSeque
result.append(QVariant::fromValue(str)); result.append(QVariant::fromValue(str));
remainingLength -= length; remainingLength -= length;
if (bytesRead) if (bytesRead)
*bytesRead += 2; *bytesRead += length;
break; break;
} }
case TYPE_SEQUENCE: { case TYPE_SEQUENCE: {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment