From 71b43b86251ac4d35481def3f29e5b524778ee1f Mon Sep 17 00:00:00 2001 From: Eric Tang Date: Wed, 9 Aug 2017 09:54:58 -0700 Subject: [PATCH] Use MAX_KEYMAP_NUM instead of a magic value --- right/src/config_parser/parse_config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/right/src/config_parser/parse_config.c b/right/src/config_parser/parse_config.c index df1f87c..ab30338 100644 --- a/right/src/config_parser/parse_config.c +++ b/right/src/config_parser/parse_config.c @@ -44,7 +44,7 @@ parser_error_t ParseConfig(config_buffer_t *buffer) } } keymapCount = readCompactLength(buffer); - if (keymapCount > 255) { + if (keymapCount > MAX_KEYMAP_NUM) { return ParserError_InvalidKeymapCount; } for (uint8_t keymapIdx = 0; keymapIdx < keymapCount; keymapIdx++) {