From 3fc7f46680297cff1ee7472a1cff4646858c8a5d Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Sat, 11 Aug 2018 21:19:02 -0700 Subject: [PATCH] Increment tree refcount. --- src/custom.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/custom.c b/src/custom.c index ecb65ac..de1ce1f 100644 --- a/src/custom.c +++ b/src/custom.c @@ -15,6 +15,9 @@ void libab_behavior_init_tree(libab_behavior* behavior, libab_tree* tree) { void libab_behavior_copy(libab_behavior* behavior, libab_behavior* into) { into->variant = behavior->variant; into->data_u = behavior->data_u; + if(into->variant == BIMPL_TREE) { + into->data_u.tree->int_value++; + } } void libab_behavior_free(libab_behavior* behavior) {