浏览代码

Improve logic when determining return value

Co-Authored-By: ploughpuff <33969763+ploughpuff@users.noreply.github.com>
Vasily 6 年之前
父节点
当前提交
f1086a72bf
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs

+ 1 - 1
MediaBrowser.MediaEncoding/Encoder/EncoderValidator.cs

@@ -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>