aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/mds-kbdc/compile-layout.c6
-rw-r--r--test-files/mds-kbdc/compile-layout/invalid/incomplete_function_call3
2 files changed, 9 insertions, 0 deletions
diff --git a/src/mds-kbdc/compile-layout.c b/src/mds-kbdc/compile-layout.c
index 1e537d5..1d05d83 100644
--- a/src/mds-kbdc/compile-layout.c
+++ b/src/mds-kbdc/compile-layout.c
@@ -445,6 +445,12 @@ static char32_t* parse_function_call(mds_kbdc_tree_t* restrict tree, const char*
arguments_ptr++;
break;
}
+ else if (**end == '\0')
+ {
+ if (tree->processed != PROCESS_LEVEL)
+ NEW_ERROR(tree, ERROR, "incomplete function call");
+ goto error;
+ }
r = parse_function_argument(tree, *end, lineoff + (size_t)(*end - raw), end, arguments + arguments_ptr++);
fail_if (r < 0);
}
diff --git a/test-files/mds-kbdc/compile-layout/invalid/incomplete_function_call b/test-files/mds-kbdc/compile-layout/invalid/incomplete_function_call
new file mode 100644
index 0000000..a1e76a6
--- /dev/null
+++ b/test-files/mds-kbdc/compile-layout/invalid/incomplete_function_call
@@ -0,0 +1,3 @@
+\f(
+"" : <\f(
+