From 605bb89b3196cc708bee8f00abc18d7d05257211 Mon Sep 17 00:00:00 2001 From: huiyadanli Date: Sun, 15 May 2022 13:16:54 +0800 Subject: [PATCH] =?UTF-8?q?[#]=20=E4=BF=AE=E5=A4=8D=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- RevokeMsgPatcher/Modifier/AppModifier.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/RevokeMsgPatcher/Modifier/AppModifier.cs b/RevokeMsgPatcher/Modifier/AppModifier.cs index 7ba15bc..4b2452e 100644 --- a/RevokeMsgPatcher/Modifier/AppModifier.cs +++ b/RevokeMsgPatcher/Modifier/AppModifier.cs @@ -243,12 +243,13 @@ namespace RevokeMsgPatcher.Modifier { FileHexEditor editor = new FileHexEditor(installPath, info); // editor.FileVersion 在 StartVersion 和 EndVersion 之间 - if (IsInVersionRange(editor.FileVersion, info.StartVersion, info.EndVersion)) + if ((string.IsNullOrEmpty(info.StartVersion) && string.IsNullOrEmpty(info.EndVersion)) + || IsInVersionRange(editor.FileVersion, info.StartVersion, info.EndVersion)) { editors.Add(editor); } } - if(editors.Count == 0) + if (editors.Count == 0) { throw new BusinessException("no_support_editor", "当前版本没有对应的文件修改信息,请确认补丁信息是否正常!"); } @@ -346,7 +347,7 @@ namespace RevokeMsgPatcher.Modifier public bool Patch() { // 首先验证文件修改器是否没问题 - if(editors.Count == 0) + if (editors.Count == 0) { throw new Exception("补丁安装失败,原因:无对应的文件修改器"); }