Yeah... it’s easy to write small code that doesn’t work.
... & (SIZE - 1)
but it looks broken because t does the C-ish mutating accumulator thing rather than acting as a base and using h as an offsetYou need a temporary variable of
int (**)[2]
to avoid doing two additions per iter, though maybe the compiler can pick that up and do it for you. Anyway, this no longer crashes but it now runs forever if the hash fillshttps://gist.github.com/pwr22/a08597e475d1aa44cd96
It will still fail looking up a non-existent key, which I don't understand
In C99 it's allowed to declare in the loop preamble. True for ANSI-C.