Currently a protocol without scancodes does not get its parameters parsed. Signed-off-by: Sean Young <sean@xxxxxxxx> --- utils/common/keymap.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/utils/common/keymap.c b/utils/common/keymap.c index 15c31c76..a3c1349e 100644 --- a/utils/common/keymap.c +++ b/utils/common/keymap.c @@ -384,13 +384,6 @@ static error_t parse_toml_protocol(const char *fname, struct toml_table_t *proot return EINVAL; } - scancodes = toml_table_in(proot, "scancodes"); - if (!scancodes) { - if (verbose) - fprintf(stderr, _("%s: no [protocols.scancodes] section\n"), fname); - return 0; - } - for (i = 0; (key = toml_key_in(proot, i)) != NULL; i++) { int64_t value; @@ -408,6 +401,13 @@ static error_t parse_toml_protocol(const char *fname, struct toml_table_t *proot } } + scancodes = toml_table_in(proot, "scancodes"); + if (!scancodes) { + if (verbose) + fprintf(stderr, _("%s: no [protocols.scancodes] section\n"), fname); + return 0; + } + struct scancode_entry **next = &map->scancode; i = 0; -- 2.24.1