From 88b9fad1102afa60e360c3d339acd1ce0f666d5a Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 9 Dec 2014 13:13:21 +0100 Subject: mds-kbdc: compile-layout: macro_call: fix bug: do not duplicate the arguments if there are none MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/mds-kbdc/compile-layout.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/mds-kbdc/compile-layout.c') diff --git a/src/mds-kbdc/compile-layout.c b/src/mds-kbdc/compile-layout.c index cc9719b..0622d35 100644 --- a/src/mds-kbdc/compile-layout.c +++ b/src/mds-kbdc/compile-layout.c @@ -2404,7 +2404,8 @@ static int compile_macro_call(mds_kbdc_tree_macro_call_t* restrict tree) /* Duplicate arguments and evaluate function calls, variable dereferences and escapes in the macro call arguments. */ - fail_if (arg = mds_kbdc_tree_dup(tree->arguments), arg == NULL); + if (tree->arguments) + fail_if (arg = mds_kbdc_tree_dup(tree->arguments), arg == NULL); fail_if (bad = evaluate_element(arg), bad < 0); if (bad) return 0; -- cgit v1.2.3-70-g09d2