Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions modules/msg/fsw/src/cfe_msg_sechdr_checksum.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ CFE_MSG_Checksum_t CFE_MSG_ComputeCheckSum(const CFE_MSG_Message_t *MsgPtr)
/* Message already checked, no error case reachable */
CFE_MSG_GetSize(MsgPtr, &PktLen);

while (PktLen--)
while (PktLen)
{
chksum ^= *(BytePtr++);
chksum ^= *BytePtr;
++BytePtr;
PktLen--;
}

return chksum;
Expand Down
Loading