Improve logic when determining return value

Co-Authored-By: ploughpuff <33969763+ploughpuff@users.noreply.github.com>
This commit is contained in:
Vasily 2019-02-28 15:58:41 +00:00 committed by GitHub
parent 7668ecf9c9
commit f1086a72bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -95,7 +95,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
}
// underTest shall be null if versions is unknown
return (underTest == null) ? false : !(underTest.CompareTo(minRequired) < 0) && !(underTest.CompareTo(maxRequired) > 0);
return (underTest == null) ? false : (underTest.CompareTo(minRequired) >= 0 && underTest.CompareTo(maxRequired) <= 0);
}
/// <summary>