summaryrefslogtreecommitdiff
path: root/lib/misc/crc.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/misc/crc.c')
-rw-r--r--lib/misc/crc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/misc/crc.c b/lib/misc/crc.c
index 9f95c37..c948b77 100644
--- a/lib/misc/crc.c
+++ b/lib/misc/crc.c
@@ -16,6 +16,7 @@
#include "lib.h"
#include "crc.h"
+#include "xlate.h"
/* Calculate an endian-independent CRC of supplied buffer */
#ifndef DEBUG_CRC32
@@ -65,7 +66,7 @@ static uint32_t _calc_crc_new(uint32_t initial, const uint8_t *buf, uint32_t siz
/* Process 4 bytes per iteration */
while (start < end) {
- crc = crc ^ *start++;
+ crc = crc ^ xlate32(*start++);
crc = crctab[crc & 0xff] ^ crc >> 8;
crc = crctab[crc & 0xff] ^ crc >> 8;
crc = crctab[crc & 0xff] ^ crc >> 8;