From 29bd693bab16109acd0266310de4e1a050b4dfb8 Mon Sep 17 00:00:00 2001 From: uael Date: Thu, 20 Apr 2023 15:36:05 +0000 Subject: [PATCH] device: fix advertising data UUID list parse loop --- bumble/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bumble/core.py b/bumble/core.py index 34412c76..aa8aee5a 100644 --- a/bumble/core.py +++ b/bumble/core.py @@ -773,7 +773,7 @@ class AdvertisingData: def uuid_list_to_objects(ad_data: bytes, uuid_size: int) -> List[UUID]: uuids = [] offset = 0 - while (uuid_size * (offset + 1)) <= len(ad_data): + while (offset + uuid_size) <= len(ad_data): uuids.append(UUID.from_bytes(ad_data[offset : offset + uuid_size])) offset += uuid_size return uuids