Check the value of macroIndex

This commit is contained in:
Eric Tang
2017-08-09 11:50:02 -07:00
parent abc0b994a4
commit c342f75031
7 changed files with 15 additions and 5 deletions

View File

@@ -52,13 +52,14 @@ parser_error_t ParseConfig(config_buffer_t *buffer)
return ParserError_InvalidKeymapCount;
}
for (uint8_t keymapIdx = 0; keymapIdx < keymapCount; keymapIdx++) {
errorCode = ParseKeymap(buffer, keymapIdx, keymapCount);
errorCode = ParseKeymap(buffer, keymapIdx, keymapCount, macroCount);
if (errorCode != ParserError_Success) {
return errorCode;
}
}
if (!ParserRunDry) {
AllKeymapsCount = keymapCount;
AllMacrosCount = macroCount;
}
return ParserError_Success;
}