Jack-Myth/Threshold-Miku

关于2.4版替换背景工具闪退

Na-Sizuku opened this issue · 2 comments

E7R8C@C 7U0HVZ3F%$@1LFR
错误提示为无法找到webkit文件,然而其他版本都正常
private static void ReplaceByMark(string FilePath, string Mark, string NewContent, string PreComment = "/", string PostComment = "/")
{
string text = File.ReadAllText(FilePath);
string text2 = PreComment + "TMC2:Begin" + Mark + PostComment;
string value = PreComment + "TMC2:End" + Mark + PostComment;
int num = text.IndexOf(text2);
if (num < 0)
{
throw new KeyNotFoundException("Mark:" + Mark + " not found at File:" + FilePath);
}
int num2 = text.IndexOf(value);
if (num2 < 0)
{
throw new OverflowException("Mark:" + Mark + " is not closed at File:" + FilePath);
}
File.WriteAllText(FilePath, text.Substring(0, num + text2.Length) + NewContent + text.Substring(num2));
}
当中标记出来的是在运行过程中报错的代码 位于第422行

不要用覆盖的方法安装。完全删掉旧版本,然后把新版本放进去。

OK这边解决了感谢