Fixing order of operations so the dest_index gets written to the right slot instead of an initial MAX_COV_SUBSCRIPTIONS-1 Co-authored-by: Tomasz Kazimierz Motyl <tomasz.motyl@se.com>
This commit is contained in:
committed by
GitHub
parent
98e8cf2147
commit
07d194ab05
@@ -393,9 +393,9 @@ static bool cov_list_subscribe(
|
||||
*error_code = ERROR_CODE_NO_SPACE_TO_ADD_LIST_ELEMENT;
|
||||
found = false;
|
||||
} else {
|
||||
COV_Subscriptions[index].dest_index = addr_add_ret;
|
||||
index = first_invalid_index;
|
||||
found = true;
|
||||
COV_Subscriptions[index].dest_index = addr_add_ret;
|
||||
COV_Subscriptions[index].flag.valid = true;
|
||||
COV_Subscriptions[index].monitoredObjectIdentifier.type =
|
||||
cov_data->monitoredObjectIdentifier.type;
|
||||
|
||||
Reference in New Issue
Block a user