Skip to content

Commit 973a8cf

Browse files
committed
Fix incorrect address check in CalculateChecksum (close #6)
1 parent 5e1616d commit 973a8cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mcc_generated_files/boot/boot_process.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ static enum BOOT_COMMAND_RESULT CalculateChecksum(void)
442442

443443
memcpy(&response, commandArray, sizeof(struct CMD_STRUCT_0));
444444

445-
if ( IsLegalRange(pCommand->address, pCommand->address+pCommand->dataLength-1))
445+
if ( IsLegalRange(pCommand->address, pCommand->address+pCommand->dataLength / 2))
446446
{
447447
for (count = 0; count < pCommand->dataLength; count += 4)
448448
{

0 commit comments

Comments
 (0)