Commit 8fe111f2 authored by Reto Da Forno's avatar Reto Da Forno
Browse files

issue with crc32 fixed (allow files larger than 65536 bytes)

parent 29069692
......@@ -33,7 +33,7 @@
#include <stdint.h>
/*---------------------------------------------------------------------------*/
uint32_t crc32(const uint8_t* data, uint16_t num_bytes, uint32_t seed)
uint32_t crc32(const uint8_t* data, uint32_t num_bytes, uint32_t seed)
{
uint32_t crc = ~seed;
while (num_bytes) {
......
......@@ -73,7 +73,7 @@ typedef struct list_meta {
/* --- function prototypes --- */
uint16_t crc16(const uint8_t* data, uint8_t num_bytes, uint16_t init_value);
uint32_t crc32(const uint8_t* data, uint16_t num_bytes, uint32_t seed);
uint32_t crc32(const uint8_t* data, uint32_t num_bytes, uint32_t seed);
uint32_t hexstr_to_uint32(const char* str);
uint32_t uint16_to_str(uint16_t val, char* out_buffer);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment