From 780f3cc80cadf87ecfdb702ef90fcb606f2783fd Mon Sep 17 00:00:00 2001 From: JSDurand Date: Sun, 16 Jul 2023 18:06:18 +0800 Subject: Fix the bug of forgetting to check cloned nodes. In the process of splitting, cloning, and planting the forest, I forgot to check whether some cloned node of the node inquestion satisfy the condition. This used to cause forests that violate some fundamental assumptions. Now this is supposed to be fixed, but more tests await us. --- src/helper.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/helper.c') diff --git a/src/helper.c b/src/helper.c index 5d7e9f8..d52fa5f 100644 --- a/src/helper.c +++ b/src/helper.c @@ -1,4 +1,5 @@ #include "helper.h" +#include "big_endian.h" struct Label read_label(unsigned char *ptr) @@ -71,3 +72,13 @@ print_label(struct Label label) printf("%llu\n", label.content); } + +void +print_node(struct CForest *forest, uint64_t node) +{ + unsigned char node_ptr[8] = { 0 }; + + to_big_endian(node, node_ptr); + + print_forest_node(forest, node_ptr); +} -- cgit v1.2.3-18-g5258