attractivechaos / khashl

Generic hash table library in C
19 stars 0 forks source link

Typo in __KHASHL_IMPL_GET implementation? #1

Closed slw287r closed 4 months ago

slw287r commented 4 months ago

https://github.com/attractivechaos/khashl/blob/9505ad403462175e69077823c9dbb85437b5c797/khashl.h#L148C1-L149C1

if (h->keys == 0) return 1;

khashl in udb3: https://github.com/attractivechaos/udb3/blob/d50d500cada3acfc9f7c6e12a9d7f742660148c2/khashl/khashl.h#L140C1-L140C32

if (h->keys == 0) return 0;
attractivechaos commented 4 months ago

Actually both versions were buggy in different ways. This should have been fixed at the github HEAD in both repo. Thanks!