diff --git a/java_tools/ConfigDefinition.jar b/java_tools/ConfigDefinition.jar index cf4b70afd9..803c58bdaa 100644 Binary files a/java_tools/ConfigDefinition.jar and b/java_tools/ConfigDefinition.jar differ diff --git a/java_tools/configuration_definition/src/main/java/com/rusefi/ReaderState.java b/java_tools/configuration_definition/src/main/java/com/rusefi/ReaderState.java index 931d8b78c0..10d0906f04 100644 --- a/java_tools/configuration_definition/src/main/java/com/rusefi/ReaderState.java +++ b/java_tools/configuration_definition/src/main/java/com/rusefi/ReaderState.java @@ -139,7 +139,8 @@ public class ReaderState { EnumIniField.ParseBitRange bitRange = new EnumIniField.ParseBitRange().invoke(rawLine.getTokens()[3]); int totalCount = 1 << (bitRange.getBitSize0() + 1); List 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