aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-12-07 14:23:36 +0100
committerMattias Andrée <maandree@operamail.com>2014-12-07 14:23:36 +0100
commit8fa7e67619960554ac4189e8bbcde4a2ac130715 (patch)
treee2036975d7ca900882fb59de4737aa2030120ee6 /src
parentm (diff)
downloadmds-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.c10
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; \