Fix crash in "Fix commo errors" - thx dramirvf :)

Fix  #8015
This commit is contained in:
Nikolaj Olsson 2024-03-12 00:58:16 +01:00
parent e5bc19548a
commit bdfb3f1122

View File

@ -909,6 +909,11 @@ namespace Nikse.SubtitleEdit.Core.Common
input = input.Substring(lineStartIndex, lineEndIndex - lineStartIndex);
var startIndex = input.IndexOf("<", StringComparison.Ordinal);
if (startIndex < 0)
{
return false;
}
var endIndex = input.LastIndexOf("</", StringComparison.Ordinal);
if (endIndex >= 0)
{