COMMON: Fix crc calculation with reflected messages
This commit is contained in:
parent
b63160a06e
commit
c60281b3d0
1 changed files with 1 additions and 1 deletions
|
@ -235,7 +235,7 @@ T CRC<T>::crcFast(byte const message[], int nBytes) {
|
|||
* Divide the message by the polynomial, a byte at a time.
|
||||
*/
|
||||
for (int b = 0; b < nBytes; ++b) {
|
||||
byte data = reflectData(message[b] ^ (remainder >> (_width - 8)));
|
||||
byte data = reflectData(message[b]) ^ (remainder >> (_width - 8));
|
||||
remainder = _crcTable[data] ^ (remainder << 8);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue