From 8fa7e67619960554ac4189e8bbcde4a2ac130715 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 7 Dec 2014 14:23:36 +0100 Subject: mds-kbdc: compile-layout: add some test cases + file parsing bug 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 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/mds-kbdc/compile-layout.c b/src/mds-kbdc/compile-layout.c index 01587c2..75b134d 100644 --- a/src/mds-kbdc/compile-layout.c +++ b/src/mds-kbdc/compile-layout.c @@ -727,11 +727,11 @@ static char32_t* parse_quoted_string(mds_kbdc_tree_t* restrict tree, const char* #define GROW_BUF \ if (buf_ptr == buf_size) \ fail_if (xxrealloc(old_buf, buf, buf_size ? (buf_size <<= 1) : 16, char)) -#define COPY \ - n = string_length(subrc); \ - if (rc_ptr + n > rc_size) \ - fail_if (xxrealloc(old_rc, rc, rc_ptr + n, char32_t)); \ - memcpy(rc + rc_ptr, subrc, n * sizeof(char32_t)); \ +#define COPY \ + n = string_length(subrc); \ + if (rc_ptr + n > rc_size) \ + fail_if (xxrealloc(old_rc, rc, rc_size = rc_ptr + n, char32_t)); \ + memcpy(rc + rc_ptr, subrc, n * sizeof(char32_t)), rc_ptr += n; \ free(subrc), subrc = NULL #define STORE \ GROW_BUF; \ -- cgit v1.2.3-70-g09d2