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.
2 parents baa1370 + eef16ce commit 9e523b5Copy full SHA for 9e523b5
src/utility/ATT.cpp
@@ -993,8 +993,8 @@ void ATTClass::readOrReadBlobReq(uint16_t connectionHandle, uint16_t mtu, uint8_
993
}
994
/// if auth error, hold the response in a buffer.
995
bool holdResponse = false;
996
-
997
- uint16_thandle = *(uint16_t*)data;
+uint16_t handle;
+ memcpy(&handle, data, sizeof(handle));
998
uint16_t offset = (opcode == ATT_OP_READ_REQ) ? 0 : *(uint16_t*)&data[sizeof(handle)];
999
1000
if ((uint16_t)(handle - 1) > GATT.attributeCount()) {
@@ -1248,7 +1248,8 @@ void ATTClass::writeReqOrCmd(uint16_t connectionHandle, uint16_t mtu, uint8_t op
1248
return;
1249
1250
1251
- uint16_t handle = *(uint16_t*)data;
+ uint16_t handle;
1252
1253
1254
1255
if (withResponse) {
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments