From 3b997b127cf19e2bc7f670bec9d153cc20e2652d Mon Sep 17 00:00:00 2001 From: Kaphotics Date: Sun, 30 Oct 2016 12:01:25 -0700 Subject: [PATCH] Fix header length write Ver6 has 8 extra bytes --- pk3DS/3DS/GARC.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pk3DS/3DS/GARC.cs b/pk3DS/3DS/GARC.cs index 27e6a60..ccd89b6 100644 --- a/pk3DS/3DS/GARC.cs +++ b/pk3DS/3DS/GARC.cs @@ -201,9 +201,9 @@ public static bool garcPackMS(string folderPath, string garcPath, int version, P #region Write GARC Headers // Write GARC gw.Write((uint)0x47415243); // GARC - gw.Write((uint)0x0000001C); // Header Length + gw.Write((uint)(version == VER_6 ? 0x24 : 0x1C)); // Header Length gw.Write((ushort)0xFEFF); // Endianness BOM - gw.Write((ushort)version); // Version + gw.Write((ushort)version); // Version gw.Write((uint)0x00000004); // Section Count (4) gw.Write((uint)0x00000000); // Data Offset (temp) gw.Write((uint)0x00000000); // File Length (temp)