Skip to content

Commit cddb90e

Browse files
jimmodpgeorge
authored andcommitted
extmod/modbluetooth_nimble: Fix wrong offset used for descriptor flags.
1 parent 66ac2e1 commit cddb90e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

extmod/modbluetooth_nimble.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ int mp_bluetooth_gatts_register_service(mp_obj_bluetooth_uuid_t *service_uuid, m
508508
for (size_t j = 0; j < num_descriptors[i]; ++j) {
509509
descriptors[j].uuid = create_nimble_uuid(descriptor_uuids[descriptor_index]);
510510
descriptors[j].access_cb = characteristic_access_cb;
511-
descriptors[j].att_flags = descriptor_flags[i];
511+
descriptors[j].att_flags = descriptor_flags[descriptor_index];
512512
descriptors[j].min_key_size = 0;
513513
// Unlike characteristic, Nimble doesn't provide an automatic way to remember the handle, so use the arg.
514514
descriptors[j].arg = &handles[handle_index];

0 commit comments

Comments
 (0)