aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-12-09 13:13:21 +0100
committerMattias Andrée <maandree@operamail.com>2014-12-09 13:13:21 +0100
commit88b9fad1102afa60e360c3d339acd1ce0f666d5a (patch)
tree3fb8fc1c9cb1a73e19bce9be5f55835cd32889eb /src
parentmds-kbdc: compile-layout: fix a bug in parse_variable (diff)
downloadmds-88b9fad1102afa60e360c3d339acd1ce0f666d5a.tar.gz
mds-88b9fad1102afa60e360c3d339acd1ce0f666d5a.tar.bz2
mds-88b9fad1102afa60e360c3d339acd1ce0f666d5a.tar.xz
mds-kbdc: compile-layout: macro_call: fix bug: do not duplicate the arguments if there are none
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src')
-rw-r--r--src/mds-kbdc/compile-layout.c3
1 files changed, 2 insertions, 1 deletions
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;