diff options
Diffstat (limited to '')
-rw-r--r-- | src/mds-kbdc/compile-layout.c | 3 | ||||
-rw-r--r-- | src/mds-kbdc/raw-data.c | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/mds-kbdc/compile-layout.c b/src/mds-kbdc/compile-layout.c index 007f6ae..dc4fa75 100644 --- a/src/mds-kbdc/compile-layout.c +++ b/src/mds-kbdc/compile-layout.c @@ -524,7 +524,8 @@ static size_t check_function_calls_in_literal_(const mds_kbdc_tree_t* restrict t if (escape) { escape = 0; - if ((c == '_') || R('a', 'z') || R('A', 'Z')) + if (((c == '_') || R('a', 'z') || R('A', 'Z')) &&(c != 'u')) + /* \u*() is disallowed because \u* is used for hexadecimal representation. */ if (check_function_call(tree, raw - 2, lineoff + (size_t)(raw - 2 - raw_), &raw, rc), *rc < 0) break; } diff --git a/src/mds-kbdc/raw-data.c b/src/mds-kbdc/raw-data.c index d8976ec..995eb79 100644 --- a/src/mds-kbdc/raw-data.c +++ b/src/mds-kbdc/raw-data.c @@ -360,9 +360,9 @@ static int expand(char** restrict content, size_t* restrict content_size) /* Expand tab spaces. */ memmove(data + extra, data, n); for (ptr = 0; ptr < n; ptr++, added--) - if (data[ptr] == '\n') + if (data[ptr + extra] == '\n') data[ptr + added++] = data[ptr + extra], col = 0; - else if (data[ptr] != '\t') + else if (data[ptr + extra] != '\t') data[ptr + added++] = data[ptr + extra], col++; else do |