title: Search recursively in binary tree in C
body: <p>The function receives parameter node (has member name) and str (the name to search)</p>
  
  <pre><code>{
      if (node == NULL) return NULL;
      if (strcmp(node-&gt;name, str) == 0) return node;
      node = search_RtLR(node-&gt;left, str);
      if (node != NULL) return node;
      node = search_RtLR(node-&gt;right, str);
      if (node != NULL) return node;
  
      return NULL;
  }
  </code></pre>
  
  <p>When I search a name that is in left subtree, it works, but when I search in right subtree the program terminates(also when there is no such name in the tree), and I can't find what's wrong. The tree is not sorted in alphabetical order.</p>