diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-12-08 02:13:16 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-12-08 02:13:16 +0100 |
commit | ac444ace1909e93a1fcdd25e25edf644756eb798 (patch) | |
tree | d8226f5dad3bf18dc814bbf95852f68d26f44809 /src/mds-kbdc | |
parent | mds-kbdc: bug fix (diff) | |
download | mds-ac444ace1909e93a1fcdd25e25edf644756eb798.tar.gz mds-ac444ace1909e93a1fcdd25e25edf644756eb798.tar.bz2 mds-ac444ace1909e93a1fcdd25e25edf644756eb798.tar.xz |
mds-kbdc: compile-keyboard: regression
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/mds-kbdc')
-rw-r--r-- | src/mds-kbdc/compile-layout.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/mds-kbdc/compile-layout.c b/src/mds-kbdc/compile-layout.c index 2dae093..b8b5cfe 100644 --- a/src/mds-kbdc/compile-layout.c +++ b/src/mds-kbdc/compile-layout.c @@ -735,10 +735,15 @@ static char32_t* parse_quoted_string(mds_kbdc_tree_t* restrict tree, const char* memcpy(rc + rc_ptr, subrc, n * sizeof(char32_t)), rc_ptr += n; \ free(subrc), subrc = NULL #define STORE \ - GROW_BUF; \ - buf[buf_ptr] = '\0', buf_ptr = 0; \ - fail_if (subrc = string_decode(buf), subrc == NULL); \ - COPY + if (buf_ptr) \ + do \ + { \ + GROW_BUF; \ + buf[buf_ptr] = '\0', buf_ptr = 0; \ + fail_if (subrc = string_decode(buf), subrc == NULL); \ + COPY; \ + } \ + while (0) #define CHAR_ERROR(...) \ do \ { \ |