diff options
author | JSDurand <mmemmew@gmail.com> | 2023-07-16 18:06:18 +0800 |
---|---|---|
committer | JSDurand <mmemmew@gmail.com> | 2023-07-16 18:06:18 +0800 |
commit | 780f3cc80cadf87ecfdb702ef90fcb606f2783fd (patch) | |
tree | 7d978d43b1c6f58c358e6f8e8d9f30c0303a7a98 /src/helper.c | |
parent | 6a24e0a805c597b8f835c5c72a0e4dcdd64ca39b (diff) |
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.
Diffstat (limited to 'src/helper.c')
-rw-r--r-- | src/helper.c | 11 |
1 files changed, 11 insertions, 0 deletions
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); +} |