diff options
Diffstat (limited to 'src/mds-kbdc/compile-layout.c')
-rw-r--r-- | src/mds-kbdc/compile-layout.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mds-kbdc/compile-layout.c b/src/mds-kbdc/compile-layout.c index c9ff65d..8e005c0 100644 --- a/src/mds-kbdc/compile-layout.c +++ b/src/mds-kbdc/compile-layout.c @@ -1071,7 +1071,7 @@ static size_t parse_variable(mds_kbdc_tree_t* restrict tree, const char* restric if (*raw == '0') goto bad; if (*raw == '.') goto bad; if (*raw == '\0') goto bad; - for (raw++; *raw; raw++) + for (; *raw; raw++) /* Check that the variable consists only of digits. */ if (('0' <= *raw) && (*raw <= '9')); /* However, it may end with a dot. */ @@ -2456,7 +2456,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; |