Skip to content
New issue

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

CTL_hash_map_find last ERR #3

Open
QHJ0517 opened this issue Jan 20, 2025 · 1 comment
Open

CTL_hash_map_find last ERR #3

QHJ0517 opened this issue Jan 20, 2025 · 1 comment

Comments

@QHJ0517
Copy link

QHJ0517 commented Jan 20, 2025

CTL_hash_map ctl;
void test_hash2(void)
{
CTL_hash_map_iterator ctl_it;
int key = 11;

srand((unsigned)time(NULL));
memset(&ctl, 0, sizeof(ctl));
memset(&ctl_it, 0, sizeof(ctl_it));

CTL_hash_map_new(&ctl, sizeof(int), sizeof(int));

for (int i = 0; i < 12; i++)
{
    CTL_hash_map_insert(&ctl, &i, &i);
}

printf("%s... \r\n", (CTL_hash_map_find(&ctl, &key, &ctl_it) == 0 ? "OK":"ERR"));

fflush(stdout);

}

Test many times , many errors when find the last one element

@inie0722
Copy link
Owner

This is a bug caused by resize and has been fixed.
Please try to pull up the latest main branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants