diff --git a/src/rbtree.c b/src/rbtree.c index d93466b..c5d1cd7 100644 --- a/src/rbtree.c +++ b/src/rbtree.c @@ -230,6 +230,9 @@ stack_t libcdsb_builtin_rbtree_iter_inorder(rbnode_t** root, bool reverse) { } } + if (reverse) + stack_reverse(&z); + return z; }