From e649e73f0908678bbdcddb38c9dd0ae13d626626 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 7 Dec 2014 00:50:43 +0100 Subject: mds-kbdc: derp 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mds-kbdc/compile-layout.c b/src/mds-kbdc/compile-layout.c index f393511..2993528 100644 --- a/src/mds-kbdc/compile-layout.c +++ b/src/mds-kbdc/compile-layout.c @@ -466,10 +466,10 @@ static void check_function_call(const mds_kbdc_tree_t* restrict tree, const char /* Copy the name of the function. */ name = alloca((size_t)(bracket - raw) * sizeof(char)); memcpy(name, raw + 1, (size_t)(bracket - raw - 1) * sizeof(char)); - name[bracket - raw - 1] = 0; + name[bracket++ - raw - 1] = 0; /* Get the number of arguments used, and check function calls there too. */ - arg_count = check_function_calls_in_literal_(tree, raw, lineoff, end, rc); + arg_count = check_function_calls_in_literal_(tree, bracket, lineoff + (size_t)(bracket - raw), end, rc); if (*rc < 0) return; /* Check that the function is defined. */ -- cgit v1.2.3-70-g09d2