We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d6b98b7 commit 816048fCopy full SHA for 816048f
linux/airpods_packets.h
@@ -120,10 +120,17 @@ namespace AirPodsPackets
120
return std::nullopt;
121
122
QByteArray value = data.mid(HEADER.size(), 2);
123
- if (value == QByteArray::fromHex("0101"))
+ if (value.size() != 2)
124
+ return std::nullopt;
125
+
126
+ char b1 = value.at(0);
127
+ char b2 = value.at(1);
128
129
+ if (b1 == 0x01 && b2 == 0x01)
130
return true;
- if (value == QByteArray::fromHex("0202"))
131
+ if (b1 == 0x02 || b2 == 0x02)
132
return false;
133
134
135
}
136
0 commit comments