From a1ff08e1388dd845452ac75e590ab918d4f52790 Mon Sep 17 00:00:00 2001 From: morkt Date: Tue, 29 Jul 2014 11:50:12 +0400 Subject: [PATCH] (Create): fixed real entries count writing. --- ArcFormats/ArcSteinsGate.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ArcFormats/ArcSteinsGate.cs b/ArcFormats/ArcSteinsGate.cs index ffb6b4e2..87df14f0 100644 --- a/ArcFormats/ArcSteinsGate.cs +++ b/ArcFormats/ArcSteinsGate.cs @@ -165,13 +165,12 @@ namespace GameRes.Formats EntryCallback callback) { var sg_options = GetOptions (options); - Encoding encoding = Encodings.WithFatalFallback (sg_options.FileNameEncoding); + Encoding encoding = sg_options.FileNameEncoding.WithFatalFallback(); long start_pos = output.Position; int callback_count = 0; uint index_size = 4; - int entry_count = list.Count(); - var real_entry_list = new List (entry_count); + var real_entry_list = new List (list.Count()); var used_names = new HashSet(); foreach (var entry in list) { @@ -216,7 +215,7 @@ namespace GameRes.Formats var encrypted_stream = new SteinsGateEncryptedStream (output); using (var header = new BinaryWriter (encrypted_stream)) { - header.Write (entry_count); + header.Write (real_entry_list.Count); foreach (var entry in real_entry_list) { header.Write (entry.IndexName.Length);