Explorar o código

lib/kcore/km_crc.c Fixed wrong computation of crc32

The final result was not bitwise complemented, yeilding an incorrect result
Marius Zbihlei %!s(int64=15) %!d(string=hai) anos
pai
achega
a6a01a9e83
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      lib/kcore/km_crc.c

+ 1 - 1
lib/kcore/km_crc.c

@@ -25,6 +25,6 @@ void crc32_uint (str *source_string, unsigned int *hash_ret)
 		hash = crc_32_tab[((unsigned char)hash) ^ *data] ^ (hash >> 8);
 	}
 	
-	*hash_ret = hash;
+	*hash_ret = ~hash;
 }