fixed seed space reduction

thanks to @easyaspi314
This commit is contained in:
Yann Collet 2020-02-22 10:07:01 -08:00
parent ee460fdbbb
commit 8d80010b7b

2
xxh3.h
View File

@ -574,7 +574,7 @@ XXH3_len_4to8_64b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_h
XXH_ASSERT(input != NULL);
XXH_ASSERT(secret != NULL);
XXH_ASSERT(4 <= len && len < 8);
seed ^= XXH_swap64(seed);
seed ^= seed << 32;
{ xxh_u32 const input1 = XXH_readLE32(input);
xxh_u32 const input2 = XXH_readLE32(input + len - 4);
xxh_u32 const key1 = XXH_swap32(input1) ^ ((xxh_u32)(seed >> 32) + XXH_readLE32(secret));