diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-12-09 13:09:49 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-12-09 13:09:54 +0100 |
commit | 3083ce927f69eae6b91b901c45c673324a75c64d (patch) | |
tree | 895c1de91c75e3d0d90a75293414fed932b4aa0c | |
parent | improve with_mutex and with_mutex_if also (diff) | |
download | mds-3083ce927f69eae6b91b901c45c673324a75c64d.tar.gz mds-3083ce927f69eae6b91b901c45c673324a75c64d.tar.bz2 mds-3083ce927f69eae6b91b901c45c673324a75c64d.tar.xz |
mds-kbdc: compile-layout: fix a bug in parse_variable
Signed-off-by: Mattias Andrée <maandree@operamail.com>
-rw-r--r-- | src/mds-kbdc/compile-layout.c | 2 | ||||
-rw-r--r-- | test-files/mds-kbdc/compile-layout/invalid/not_a_variable | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/src/mds-kbdc/compile-layout.c b/src/mds-kbdc/compile-layout.c index 9441802..cc9719b 100644 --- a/src/mds-kbdc/compile-layout.c +++ b/src/mds-kbdc/compile-layout.c @@ -1062,7 +1062,7 @@ static size_t parse_variable(mds_kbdc_tree_t* restrict tree, const char* restric if (*raw == '0') goto bad; if (*raw == '.') goto bad; if (*raw == '\0') goto bad; - for (raw++; *raw; raw++) + for (; *raw; raw++) /* Check that the variable consists only of digits. */ if (('0' <= *raw) && (*raw <= '9')); /* However, it may end with a dot. */ diff --git a/test-files/mds-kbdc/compile-layout/invalid/not_a_variable b/test-files/mds-kbdc/compile-layout/invalid/not_a_variable index 9d9c5ba..cc189ea 100644 --- a/test-files/mds-kbdc/compile-layout/invalid/not_a_variable +++ b/test-files/mds-kbdc/compile-layout/invalid/not_a_variable @@ -1,5 +1,3 @@ -# TODO does not work - let 1 : 1 let \. : 1 let \0 : 1 |