diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-12-07 14:23:36 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-12-07 14:23:36 +0100 |
commit | 8fa7e67619960554ac4189e8bbcde4a2ac130715 (patch) | |
tree | e2036975d7ca900882fb59de4737aa2030120ee6 /src | |
parent | m (diff) | |
download | mds-8fa7e67619960554ac4189e8bbcde4a2ac130715.tar.gz mds-8fa7e67619960554ac4189e8bbcde4a2ac130715.tar.bz2 mds-8fa7e67619960554ac4189e8bbcde4a2ac130715.tar.xz |
mds-kbdc: compile-layout: add some test cases + file parsing bug
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/mds-kbdc/compile-layout.c | 10 |
1 files changed, 5 insertions, 5 deletions
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; \ |