mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-27 22:42:38 +01:00
Fixed bug in sami reading - thx josh :)
git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@1266 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
parent
9d9f1ce520
commit
053fa2931f
@ -133,9 +133,10 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
while (syncStartPos >= 0)
|
||||
{
|
||||
string millisecAsString = string.Empty;
|
||||
while (index < allInput.Length && "0123456789".Contains(allInput[index].ToString()))
|
||||
while (index < allInput.Length && "\"'0123456789".Contains(allInput[index].ToString()))
|
||||
{
|
||||
millisecAsString += allInput[index];
|
||||
if (allInput[index] != '"' && allInput[index] != '\'')
|
||||
millisecAsString += allInput[index];
|
||||
index++;
|
||||
}
|
||||
|
||||
@ -210,7 +211,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
||||
cleanText = cleanText.Replace(" ", string.Empty).Replace("&NBSP;", string.Empty);
|
||||
cleanText = cleanText.Trim();
|
||||
|
||||
if (!string.IsNullOrEmpty(p.Text))
|
||||
if (!string.IsNullOrEmpty(p.Text) && !string.IsNullOrEmpty(millisecAsString))
|
||||
{
|
||||
p.EndTime = new TimeCode(TimeSpan.FromMilliseconds(long.Parse(millisecAsString)));
|
||||
subtitle.Paragraphs.Add(p);
|
||||
|
Loading…
Reference in New Issue
Block a user