Merge pull request #5593 from pan-/ble-fix-equality-comparison

BLE: Fix greater than or equal to comparision in GattCharacteristic.
pull/5586/merge
Martin Kojtal 2017-11-30 18:04:58 +00:00 committed by GitHub
commit 0ef3ca7f19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -85,7 +85,7 @@
* A characteristic is a typed value used in a service. It contains a set of
* properties that define client operations supported by the characteristic.
* A characteristic may also include descriptors; a descriptor exposes
* metainformation associated to a characteristic, such as the unit of its value,
* metainformation associated to a characteristic, such as the unit of its value,
* its human readable name or a control point attribute that allows the client to
* subscribe to the characteristic notifications.
*
@ -1632,7 +1632,7 @@ public:
*/
GattAttribute *getDescriptor(uint8_t index)
{
if (index = _descriptorCount) {
if (index >= _descriptorCount) {
return NULL;
}