mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-23 03:33:18 +01:00
Fix #2481
This commit is contained in:
parent
36612752d9
commit
95b611a609
@ -7,20 +7,11 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
|
||||
{
|
||||
public class CaptionsInc : SubtitleFormat
|
||||
{
|
||||
public override string Extension
|
||||
{
|
||||
get { return ".cin"; }
|
||||
}
|
||||
public override string Extension => ".cin";
|
||||
|
||||
public override string Name
|
||||
{
|
||||
get { return "Caption Inc"; }
|
||||
}
|
||||
public override string Name => "Caption Inc";
|
||||
|
||||
public override bool IsTimeBased
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
public override bool IsTimeBased => true;
|
||||
|
||||
public static void Save(string fileName, Subtitle subtitle)
|
||||
{
|
||||
@ -36,7 +27,7 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
|
||||
WriteTime(fs, subtitle.Paragraphs[0].StartTime, false); // first start time
|
||||
WriteTime(fs, subtitle.Paragraphs[subtitle.Paragraphs.Count - 1].EndTime, false); // last end time
|
||||
|
||||
buffer = Encoding.ASCII.GetBytes("Generic Unknown Unknown \"\" Unknown Unknown Unknown ");
|
||||
buffer = Encoding.ASCII.GetBytes("Generic Unknown Unknown \"\" Unknown Unknown Unknown".PadRight(230, ' '));
|
||||
fs.Write(buffer, 0, buffer.Length);
|
||||
|
||||
// paragraphs
|
||||
@ -191,7 +182,7 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
|
||||
textEnd = true;
|
||||
else if (buffer[i] <= 0x17)
|
||||
{
|
||||
if (!sb.ToString().EndsWith(Environment.NewLine))
|
||||
if (!sb.ToString().EndsWith(Environment.NewLine, StringComparison.Ordinal))
|
||||
sb.Append(Environment.NewLine);
|
||||
i++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user