From d3e9ede7c48cc84ac0ec0f448e7ea0281abbef89 Mon Sep 17 00:00:00 2001 From: Kurt Date: Tue, 16 Jun 2015 23:46:59 -0700 Subject: [PATCH] Fix DARC repack grabbing from the wrong offsets --- pk3DS/3DS/DARC.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pk3DS/3DS/DARC.cs b/pk3DS/3DS/DARC.cs index f3d27a5..944f6ac 100644 --- a/pk3DS/3DS/DARC.cs +++ b/pk3DS/3DS/DARC.cs @@ -328,7 +328,7 @@ internal static bool insertFile(DARC orig, int index, byte[] data) try { uint oldLength = orig.Entries[index].DataLength; - uint offset = orig.Entries[index].DataOffset; + uint offset = orig.Entries[index].DataOffset - orig.Header.FileDataOffset; int diff = (int) (data.Length - oldLength); // Insert into Data Block