• Custom User Avatar

    the problem comes from your code, you are not setting the tree_size to 0 for an empty tree

  • Custom User Avatar

    I would believe the problem is on your side. Are you sure you return a dynamically allocated buffer every time?
    If you cannot find the problem with your solution, you can post it here (remember about code formatting and spoiler flag!), so we could check it.