Diff between e3c5f6050a8bc8844c66ec8ddca37ade083fe64f and 73ae3fb93d271c1a3536a7a280b911808dc5c9c4

Changed Files

File Additions Deletions Status
src/shared/gatt-db.c +2 -2 modified

Full Patch

diff --git a/src/shared/gatt-db.c b/src/shared/gatt-db.c
index b441405..8951079 100644
--- a/src/shared/gatt-db.c
+++ b/src/shared/gatt-db.c
@@ -1980,8 +1980,8 @@ bool gatt_db_attribute_get_char_data(const struct gatt_db_attribute *attrib,
 
 		/* Check if Characteristic Value was passed instead */
 		index = gatt_db_attribute_get_index(attrib);
-		if (index < 0)
-			return NULL;
+		if (index <= 0)
+			return false;
 
 		attrib = attrib->service->attributes[index - 1];
 		if (bt_uuid_cmp(&characteristic_uuid, &attrib->uuid))