From 0120df2dd897e0700dd371964041a95ec64c0ae3 Mon Sep 17 00:00:00 2001 From: Kurt Date: Sun, 25 Dec 2016 23:25:04 -0800 Subject: [PATCH] Fix typechart offset find Closes #74 offset is before 0x500000 --- pk3DS/Subforms/Gen7/TypeChart7.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pk3DS/Subforms/Gen7/TypeChart7.cs b/pk3DS/Subforms/Gen7/TypeChart7.cs index aeeac85..e71380d 100644 --- a/pk3DS/Subforms/Gen7/TypeChart7.cs +++ b/pk3DS/Subforms/Gen7/TypeChart7.cs @@ -23,7 +23,7 @@ public TypeChart7() if (!File.Exists(files[0]) || !Path.GetFileNameWithoutExtension(files[0]).Contains("code")) { Util.Alert("No .code.bin detected."); Close(); } exefs = File.ReadAllBytes(files[0]); if (exefs.Length % 0x200 != 0) { Util.Alert(".code.bin not decompressed. Aborting."); Close(); } - offset = Util.IndexOfBytes(exefs, Signature, 0x500000, 0) + Signature.Length; + offset = Util.IndexOfBytes(exefs, Signature, 0x400000, 0) + Signature.Length; Array.Copy(exefs, offset, chart, 0, chart.Length); populateChart();