mirror of https://github.com/rusefi/rusefi.git
only: better validation
This commit is contained in:
parent
198609ecaf
commit
46c5923f25
|
@ -74,7 +74,7 @@ public class EnumConfigField extends BaseConfigField {
|
|||
item = "unexpected_" + ordinal;
|
||||
view.addItem(item);
|
||||
} else {
|
||||
if (ordinal >= options.length)
|
||||
if (ordinal < 0 || ordinal >= options.length)
|
||||
throw new UnexpectedEnumOridnalException(ordinal + " unexpected on " + field);
|
||||
item = options[ordinal];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue