Skip to content

Commit 0ef3ca7

Browse files
authored
Merge pull request #5593 from pan-/ble-fix-equality-comparison
BLE: Fix greater than or equal to comparision in GattCharacteristic.
2 parents b076565 + 6c015b9 commit 0ef3ca7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

features/FEATURE_BLE/ble/GattCharacteristic.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
* A characteristic is a typed value used in a service. It contains a set of
8686
* properties that define client operations supported by the characteristic.
8787
* A characteristic may also include descriptors; a descriptor exposes
88-
* metainformation associated to a characteristic, such as the unit of its value,
88+
* metainformation associated to a characteristic, such as the unit of its value,
8989
* its human readable name or a control point attribute that allows the client to
9090
* subscribe to the characteristic notifications.
9191
*
@@ -1632,7 +1632,7 @@ class GattCharacteristic {
16321632
*/
16331633
GattAttribute *getDescriptor(uint8_t index)
16341634
{
1635-
if (index = _descriptorCount) {
1635+
if (index >= _descriptorCount) {
16361636
return NULL;
16371637
}
16381638

0 commit comments

Comments
 (0)