Drew reminds that humans like sorted drop downs #4339

This commit is contained in:
rusefillc 2022-07-12 05:36:06 -04:00
parent cede67c5e5
commit 116cc881d3
2 changed files with 2 additions and 1 deletions

Binary file not shown.

View File

@ -139,7 +139,8 @@ public class ReaderState {
EnumIniField.ParseBitRange bitRange = new EnumIniField.ParseBitRange().invoke(rawLine.getTokens()[3]);
int totalCount = 1 << (bitRange.getBitSize0() + 1);
List<String> enums = Arrays.asList(rawLine.getTokens()).subList(4, rawLine.getTokens().length);
if (enums.size() > totalCount)
// at the moment we read 0=NONE as two tokens, thus enums.size() is divided by two
if (enums.size() / 2 > totalCount)
throw new IllegalStateException(name + ": Too many options in " + tunerStudioLine + " capacity=" + totalCount + "/size=" + enums.size());
/*
this does not work right now since smt32 and kinetis enum sizes could be different but same .txt file