We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In function 'HT_GROW', there may be a bug.
do { \ new_len = name##_PRIMES[++prime_idx]; \ new_load_limit = (unsigned)(load*new_len); \ } while (new_load_limit <= size && \ prime_idx < (int)name##_N_PRIMES);
When prime_idx grows to N_PRIMES - 1,next prime_idx becomes N_PRIMES. This is a problem with visiting PRIMES.
prime_idx
N_PRIMES - 1
N_PRIMES
PRIMES
The text was updated successfully, but these errors were encountered:
Indeed, nice catch! Can you send a PR with a patch (it will be great if you will add some regression test for this, see test/ directory for examples)?
test/
Sorry, something went wrong.
No branches or pull requests
In function 'HT_GROW', there may be a bug.
When
prime_idx
grows toN_PRIMES - 1
,nextprime_idx
becomesN_PRIMES
. This is a problem with visitingPRIMES
.The text was updated successfully, but these errors were encountered: