From 693cecd71a1a3c78e3b5adbdf887342b1b53af05 Mon Sep 17 00:00:00 2001 From: morkt Date: Fri, 21 Apr 2017 09:07:15 +0400 Subject: [PATCH] (XP3): fixed encrypted files packing. --- ArcFormats/KiriKiri/ArcXP3.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ArcFormats/KiriKiri/ArcXP3.cs b/ArcFormats/KiriKiri/ArcXP3.cs index c245cef7..290d929b 100644 --- a/ArcFormats/KiriKiri/ArcXP3.cs +++ b/ArcFormats/KiriKiri/ArcXP3.cs @@ -533,7 +533,7 @@ NextEntry: Name = name, Cipher = scheme, IsEncrypted = use_encryption - && !(scheme.StartupTjsNotEncrypted && name.EndsWith ("startup.tjs")) + && !(scheme.StartupTjsNotEncrypted && VFS.IsPathEqualsToFileName (name, "startup.tjs")) }; bool compress = compress_contents && ShouldCompressFile (entry); using (var file = File.Open (name, FileMode.Open, FileAccess.Read)) @@ -674,7 +674,6 @@ NextEntry: Size = unpacked_size, PackedSize = unpacked_size, }; - xp3entry.Segments.Add (segment); if (compress) { output = new ZLibStream (output, CompressionMode.Compress, CompressionLevel.Level9, true); @@ -715,6 +714,7 @@ NextEntry: segment.PackedSize = (uint)(dest.Position - segment.Offset); xp3entry.Size = segment.PackedSize; } + xp3entry.Segments.Add (segment); } } }