Skip to content

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

Description

@zhou317

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;
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions