Skip to content

Commit 6384af8

Browse files
committed
Fixed PR #1569 for loop j variable wasn't being incremented.
1 parent 0dc4903 commit 6384af8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/boards/mcu/utilities.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ uint32_t Crc32( uint8_t *buffer, uint16_t length )
107107
for( uint16_t i = 0; i < length; ++i )
108108
{
109109
crc ^= ( uint32_t )buffer[i];
110-
for( uint16_t j = 0; j < 8; i++ )
110+
for( uint16_t j = 0; j < 8; j++ )
111111
{
112112
crc = ( crc >> 1 ) ^ ( reversedPolynom & ~( ( crc & 0x01 ) - 1 ) );
113113
}
@@ -137,7 +137,7 @@ uint32_t Crc32Update( uint32_t crcInit, uint8_t *buffer, uint16_t length )
137137
for( uint16_t i = 0; i < length; ++i )
138138
{
139139
crc ^= ( uint32_t )buffer[i];
140-
for( uint16_t j = 0; j < 8; i++ )
140+
for( uint16_t j = 0; j < 8; j++ )
141141
{
142142
crc = ( crc >> 1 ) ^ ( reversedPolynom & ~( ( crc & 0x01 ) - 1 ) );
143143
}

0 commit comments

Comments
 (0)