fix validateValues

This commit is contained in:
andreika-git 2023-09-27 19:00:31 +03:00 committed by rusefillc
parent 6f94f7cfda
commit ca15cd3110
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}