aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mds-kbdc/make-tree.c1
-rw-r--r--src/mds-kbdc/mds-kbdc.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/src/mds-kbdc/make-tree.c b/src/mds-kbdc/make-tree.c
index 5caaa72..37ed34c 100644
--- a/src/mds-kbdc/make-tree.c
+++ b/src/mds-kbdc/make-tree.c
@@ -935,6 +935,7 @@ int parse_to_tree(const char* restrict filename, mds_kbdc_tree_t** restrict resu
#define node supernode
#define inner sequence
NEW_NODE(map, MAP); /* FIXME memory leak */
+ node->loc_end = node->loc_start;
BRANCH(":");
#undef inner
#undef node
diff --git a/src/mds-kbdc/mds-kbdc.c b/src/mds-kbdc/mds-kbdc.c
index ef058ba..82702c4 100644
--- a/src/mds-kbdc/mds-kbdc.c
+++ b/src/mds-kbdc/mds-kbdc.c
@@ -45,6 +45,7 @@ int main(int argc_, char** argv_)
argv = argv_;
fail_if (parse_to_tree(argv[1], &tree, &parse_errors) < 0);
+ mds_kbdc_tree_print(tree, stderr);
if (parse_errors != NULL)
{
mds_kbdc_parse_error_t** errors = parse_errors;
@@ -57,7 +58,7 @@ int main(int argc_, char** argv_)
}
mds_kbdc_parse_error_free_all(parse_errors);
if (fatal)
- return mds_kbdc_tree_print(tree, stderr), mds_kbdc_tree_free(tree), 1;
+ return mds_kbdc_tree_free(tree), 1;
}
mds_kbdc_tree_free(tree);