Skip to content

Commit

Permalink
Fixed PR #1569 for loop j variable wasn't being incremented.
Browse files Browse the repository at this point in the history
  • Loading branch information
mluis1 committed Sep 25, 2023
1 parent 0dc4903 commit 6384af8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/boards/mcu/utilities.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ uint32_t Crc32( uint8_t *buffer, uint16_t length )
for( uint16_t i = 0; i < length; ++i )
{
crc ^= ( uint32_t )buffer[i];
for( uint16_t j = 0; j < 8; i++ )
for( uint16_t j = 0; j < 8; j++ )
{
crc = ( crc >> 1 ) ^ ( reversedPolynom & ~( ( crc & 0x01 ) - 1 ) );
}
Expand Down Expand Up @@ -137,7 +137,7 @@ uint32_t Crc32Update( uint32_t crcInit, uint8_t *buffer, uint16_t length )
for( uint16_t i = 0; i < length; ++i )
{
crc ^= ( uint32_t )buffer[i];
for( uint16_t j = 0; j < 8; i++ )
for( uint16_t j = 0; j < 8; j++ )
{
crc = ( crc >> 1 ) ^ ( reversedPolynom & ~( ( crc & 0x01 ) - 1 ) );
}
Expand Down

0 comments on commit 6384af8

Please sign in to comment.