Limit the number of macros to 255

This commit is contained in:
Eric Tang
2017-08-09 11:13:52 -07:00
parent 558089f856
commit b0b659940d
5 changed files with 5 additions and 5 deletions

View File

@@ -41,7 +41,7 @@ parser_error_t ParseConfig(config_buffer_t *buffer)
if (macroCount > MAX_MACRO_NUM) {
return ParserError_InvalidMacroCount;
}
for (uint16_t macroIdx = 0; macroIdx < macroCount; macroIdx++) {
for (uint8_t macroIdx = 0; macroIdx < macroCount; macroIdx++) {
errorCode = ParseMacro(buffer, macroIdx);
if (errorCode != ParserError_Success) {
return errorCode;