jermp / pthash

Fast and compact minimal perfect hash functions in C++.
MIT License
179 stars 25 forks source link

Fix Rice parameter calculation #32

Closed ByteHamster closed 3 months ago

ByteHamster commented 3 months ago

std::max(0, ...) does nothing for unsigned numbers. I saw crashes because it tried to allocate memory close to UINT64_MAX

jermp commented 3 months ago

Nice catch!