Skip to content

Commit

Permalink
0.9.2.7で発生すると報告いただいたエンコードエラーを回避できるかもしれない変更。
Browse files Browse the repository at this point in the history
正直なところ、問題を再現できておらず、本当にここが原因なのかよくわからない。
  • Loading branch information
rigaya committed Nov 30, 2022
1 parent be1a170 commit 88f520a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion AmatsukazeServer/Server/Misc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,14 @@ private void OutLine()
{
DateTime timeNow = DateTime.Now;
TimeSpan threshold = new TimeSpan(0, 0, 0, 0, 500);
if (!Regex.IsMatch(text, svtav1_encoding) || (timeNow - lastReplace) >= threshold)
bool isSVTAV1Encoding = false;
try
{
isSVTAV1Encoding = Regex.IsMatch(text, svtav1_encoding);
} catch (Exception) {

}
if (!isSVTAV1Encoding || (timeNow - lastReplace) >= threshold)
{
OnReplaceLine(text);
lastReplace = timeNow;
Expand Down

0 comments on commit 88f520a

Please sign in to comment.