Skip to content

Commit

Permalink
nimble/audio: Use proper array size in delegator assert
Browse files Browse the repository at this point in the history
This commit changes subgroups filed in assert
used in operation handler in scan delegator.
Now proper defined array size is used.
  • Loading branch information
szymon-czapracki committed Sep 23, 2024
1 parent a633169 commit 8f420b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nimble/host/audio/src/ble_audio_scan_delegator.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ bass_modify_source_op_handler(struct ble_svc_audio_bass_operation *op, void *arg
sync_opt = &action.source_modify.sync_opt;
sync_opt_init(sync_opt, op->modify_source.pa_sync, op->modify_source.pa_interval, NULL, 0);

BLE_AUDIO_DBG_ASSERT(sync_opt->num_subgroups < ARRAY_SIZE(subgroups));
BLE_AUDIO_DBG_ASSERT(sync_opt->num_subgroups < ARRAY_SIZE(sync_opt->subgroups));

for (uint8_t i = 0; i < sync_opt->num_subgroups; i++) {
sync_opt->subgroups[i].bis_sync = op->modify_source.bis_sync[i];
Expand Down

0 comments on commit 8f420b9

Please sign in to comment.