make explicit, there was no bug only because the if statement is identical to above

This commit is contained in:
Shane Smiskol 2023-04-26 15:36:16 -07:00
parent b342c2d724
commit fcb2a106b9
1 changed files with 7 additions and 5 deletions

View File

@ -149,11 +149,13 @@ int get_addr_check_index(CANPacket_t *to_push, AddrCheckStruct addr_list[], cons
}
}
int idx = addr_list[i].index;
if ((addr == addr_list[i].msg[idx].addr) && (bus == addr_list[i].msg[idx].bus) &&
(length == addr_list[i].msg[idx].len)) {
index = i;
break;
if (addr_list[i].msg_seen) {
int idx = addr_list[i].index;
if ((addr == addr_list[i].msg[idx].addr) && (bus == addr_list[i].msg[idx].bus) &&
(length == addr_list[i].msg[idx].len)) {
index = i;
break;
}
}
}
return index;