mirror of https://github.com/rusefi/rusefi.git
fix validateValues
This commit is contained in:
parent
6f94f7cfda
commit
ca15cd3110
|
@ -141,7 +141,7 @@ public class EnumsReader {
|
|||
|
||||
private static void validateValues(Map<String, Value> currentValues, VariableRegistry registry, boolean enumWithValues) {
|
||||
for (Map.Entry<String, Value> entry : currentValues.entrySet()) {
|
||||
int v = entry.getValue().getIntValueMaybeResolve(registry);
|
||||
int v = enumWithValues ? entry.getValue().getIntValueMaybeResolve(registry) : entry.getValue().getIntValue();
|
||||
if (v < 0 || (v >= currentValues.size() && !enumWithValues))
|
||||
throw new IllegalStateException("Unexpected " + entry);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue