Add constant expected chars

This commit is contained in:
Ivandro Ismael 2016-01-23 02:03:58 +00:00
parent 2462b160f8
commit 5ee424b826

View File

@ -250,10 +250,11 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
}
var p = new Paragraph();
const string expectedChars = @"""'0123456789";
while (syncStartPos >= 0)
{
string millisecAsString = string.Empty;
while (index < allInput.Length && @"""'0123456789".Contains(allInput[index]))
while (index < allInput.Length && expectedChars.Contains(allInput[index]))
{
if (allInput[index] != '"' && allInput[index] != '\'')
millisecAsString += allInput[index];