Skip to content
Snippets Groups Projects
Commit 142c1c3a authored by Marek Vavrusa's avatar Marek Vavrusa
Browse files

Return rightmost node when searching for node before leftmost.

Change-Id: I370ec936172d0d3a3422417010de6166810bcb72
parent 5463ce13
No related merge requests found
......@@ -194,7 +194,9 @@ int knot_zone_tree_get_less_or_equal(knot_zone_tree_t *tree,
*found = NULL;
} else if (ret > 0) {
/* node is before first node in the trie */
assert(0);
*previous = knot_node_get_previous(*found);
/* left of leftmost node is the rightmost node */
*found = NULL;
}
/* Check if previous node is not an empty non-terminal. */
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment