From 9f78a6069456e05c66eb864f066d2a1d6ea4bdea Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 16 Nov 2014 23:20:18 +0100 Subject: m MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/mds-kbdc/make-tree.c | 1 + src/mds-kbdc/mds-kbdc.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src/mds-kbdc') 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); -- cgit v1.2.3-70-g09d2