From fa2bf8de50ed81d24fdc8b599408b6f79bf58efb Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Mon, 4 Jul 2022 20:56:00 +0200 Subject: [PATCH] [Darwin] Change the check for the ble advertisement data size from >= 7 to == 8 (#20277) --- src/platform/Darwin/BleConnectionDelegateImpl.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform/Darwin/BleConnectionDelegateImpl.mm b/src/platform/Darwin/BleConnectionDelegateImpl.mm index 579fab4abf6294..226efb7e22a546 100644 --- a/src/platform/Darwin/BleConnectionDelegateImpl.mm +++ b/src/platform/Darwin/BleConnectionDelegateImpl.mm @@ -174,7 +174,7 @@ - (void)centralManager:(CBCentralManager *)central NSData * serviceData = [servicesData objectForKey:serviceUUID]; NSUInteger length = [serviceData length]; - if (length >= 7) { + if (length == 8) { const uint8_t * bytes = (const uint8_t *) [serviceData bytes]; uint8_t opCode = bytes[0]; uint16_t discriminator = (bytes[1] | (bytes[2] << 8)) & 0xfff;