From Andrew Chatham: fix bug in 64-bit hash.

This commit is contained in:
Ian Lance Taylor 2007-10-05 17:36:31 +00:00
parent 058f233b7a
commit 2fb69fac7a

View file

@ -111,7 +111,7 @@ Stringpool_template<Stringpool_char>::Stringpool_hash::operator()(
const char* p = reinterpret_cast<const char*>(s); const char* p = reinterpret_cast<const char*>(s);
for (size_t i = 0; i < sizeof(Stringpool_char); ++i) for (size_t i = 0; i < sizeof(Stringpool_char); ++i)
{ {
result &= (size_t) *p++; result ^= (size_t) *p++;
result *= 1099511628211ULL; result *= 1099511628211ULL;
} }
++s; ++s;