I have algo to compute CRC32. It similar to ntdll.RtlComputeCrc32 , but in Pelles it return another number. In VS all ok. Why? This is bug or feature?
So, code is
unsigned int crc32(unsigned int seed, void *msg, size_t len)
{
unsigned int crc = ~seed;
while (len--) {
crc ^= *((unsigned char *)msg)++;
for (size_t i = 0; i < 8; ++i)
crc = (crc >> 1) ^ (0xEDB88320 & ~(crc & 1) + 1);
}
return ~crc;
}
VS return 1267612143, RtlComputeCrc32 return 1267612143 , but Pelles return 3818104785
tmp = crc32(0, "abcdef", 6);