From c4baaa211e6140cdc01baf025f57f2ff75da9e21 Mon Sep 17 00:00:00 2001 From: niksedk Date: Mon, 7 Feb 2011 20:08:26 +0000 Subject: [PATCH] Fix a bug in ebu stl subtitle format where the two first letters were skipped (thx Rumen) git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@320 99eadd0c-20b8-1223-b5c4-2a2b2df33de2 --- src/Logic/SubtitleFormats/Ebu.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Logic/SubtitleFormats/Ebu.cs b/src/Logic/SubtitleFormats/Ebu.cs index 79c9de875..56d0836ca 100644 --- a/src/Logic/SubtitleFormats/Ebu.cs +++ b/src/Logic/SubtitleFormats/Ebu.cs @@ -429,7 +429,6 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats byte[] buffer = ASCIIEncoding.ASCII.GetBytes(header.ToString()); fs.Write(buffer, 0, buffer.Length); - foreach (Paragraph p in subtitle.Paragraphs) { EbuTextTimingInformation tti = new EbuTextTimingInformation(); @@ -848,7 +847,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats for (int i = 0; i < 112; i++) // skip fist byte (seems to be always 0xd/32/space - thx Iban) { byte b = buffer[index + 16 + i]; - if (i == 0 || i == 2 | i == 3) + if (i == 0 || (i == 2 && b < 0xf) | (i == 3 && b <= 0xf)) { // not used, 0=0xd, 2=0xb, 3=0xb }