srdja / Collections-C

A library of generic data structures for the C language.
http://srdja.github.io/Collections-C
GNU Lesser General Public License v3.0
2.8k stars 328 forks source link

Fix #146 #176

Closed fhilgers closed 3 months ago

fhilgers commented 3 months ago

The fix for #146.

I also upper_pow_two(0) = 1 instead of upper_pow_two(0) = 2 as that should be as far as I understand the mathematically correct next upper power. Let me know if that is fine, if not I will change it back.

srdja commented 3 months ago

@fhilgers Thanks!

Setting it to 1 is definitely correct. I'm not really sure why it was set to 2. Maybe it was an early workaround, or maybe it was just an error, who knows. :)