From 0881ba9076bd50afca27067b11711aeb963bd06a Mon Sep 17 00:00:00 2001 From: Gregory Lirent Date: Fri, 26 Aug 2022 10:00:49 +0300 Subject: [PATCH] Fix rbtree inorder reverse iter --- src/rbtree.c | 3 +++ 1 file changed, 3 insertions(+) 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; }