Merge pull request #1136 from TebbeUbben/profile-invalid-fix

Mark profile as invalid if high target < low target
This commit is contained in:
Milos Kozak 2018-06-23 18:24:40 +02:00 committed by GitHub
commit 470487375d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -202,6 +202,12 @@ public class Profile {
if (targetHigh_v == null)
targetHigh_v = convertToSparseArray(targetHigh);
validate(targetHigh_v);
if (targetHigh_v.size() != targetLow_v.size()) isValid = false;
else for (int i = 0; i < targetHigh_v.size(); i++)
if (targetHigh_v.get(i) < targetLow_v.get(i))
isValid = false;
isValidated = true;
}