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

search get null when str2 = str1 + '\0' #54

Open
zhou317 opened this issue Jan 4, 2024 · 0 comments
Open

search get null when str2 = str1 + '\0' #54

zhou317 opened this issue Jan 4, 2024 · 0 comments

Comments

@zhou317
Copy link

zhou317 commented Jan 4, 2024

after insert "1", "2", "1\0\1", we'll get null if we search "1\0\1"。

void* reproduce_issue() {
  art_tree tree;
  art_tree_init(&tree);
  int v1 = 1;
  int v2 = 2;
  int v3 = 3;
  
  art_insert(&tree, "1", 1, &v1);
  art_insert(&tree, "2", 1, &v2);
  art_insert(&tree, "1\0\1", 3, &v3);
  int* ret = art_search(&tree, "1\0\1", 3);

  return ret;
}

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

1 participant