aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/tree.c8
-rw-r--r--test/echo.blc1
-rw-r--r--test/echo.blc.dump6
3 files changed, 12 insertions, 3 deletions
diff --git a/src/tree.c b/src/tree.c
index e19678e..25a974e 100644
--- a/src/tree.c
+++ b/src/tree.c
@@ -227,9 +227,11 @@ struct tree *tree_merge_duplicates(struct term *term, void **all_trees)
// get the deduplication candidates
void *set = 0;
- build_tree(term, &set);
- if (!set)
- fatal("term too short\n");
+ struct tree *built = build_tree(term, &set);
+ if (!set) {
+ debug("term not suitable for deduplication, emitting directly\n");
+ return built;
+ }
// construct priority queue while deleting set
// ~> sorts the candidates by get_pri
diff --git a/test/echo.blc b/test/echo.blc
new file mode 100644
index 0000000..66375d5
--- /dev/null
+++ b/test/echo.blc
@@ -0,0 +1 @@
+0010
diff --git a/test/echo.blc.dump b/test/echo.blc.dump
new file mode 100644
index 0000000..5a45d60
--- /dev/null
+++ b/test/echo.blc.dump
@@ -0,0 +1,6 @@
+
+=== START BLOC ===
+| entries: 1
+| final: [0]
+=== END BLOC ===
+