Skip to content

Commit

Permalink
Fix #79, Correct MsgId check
Browse files Browse the repository at this point in the history
Use the "CFE_SB_IsValidMsgId()" function to check msgids, as this
is the source of truth.
  • Loading branch information
jphickey committed Jan 22, 2024
1 parent e913f93 commit 5577b81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cfecfs/edsmsg/fsw/src/cfe_msg_msgid.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ CFE_Status_t CFE_MSG_SetMsgId(CFE_MSG_Message_t *MsgPtr, CFE_SB_MsgId_t MsgId)
* not really a concept of a "highest" msg ID at all. However, for historical/backward
* compatibility reasons, this symbol is still defined in SB.
*/
if (MsgPtr == NULL || CFE_SB_MsgIdToValue(MsgId) > CFE_PLATFORM_SB_HIGHEST_VALID_MSGID)
if (MsgPtr == NULL || !CFE_SB_IsValidMsgId(MsgId))
{
return CFE_MSG_BAD_ARGUMENT;
}
Expand Down

0 comments on commit 5577b81

Please sign in to comment.