From 9f6e31f6eba013ffd7964e5dd4fbdadd9ecc5d22 Mon Sep 17 00:00:00 2001 From: Kaphotics Date: Tue, 9 Feb 2016 15:37:12 -0800 Subject: [PATCH] Fix 1MB importing opposite Yes => 0 No => 1 Nobody uses 1MB imports anyway... --- PKX/f1-Main.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/PKX/f1-Main.cs b/PKX/f1-Main.cs index b2e6a00fb..881acd8bf 100644 --- a/PKX/f1-Main.cs +++ b/PKX/f1-Main.cs @@ -562,11 +562,9 @@ private void openFile(byte[] input, string path, string ext) { Util.Error("PKHeX only edits decrypted save files.", "This save file is not decrypted."); return; } DialogResult sdr = Util.Prompt(MessageBoxButtons.YesNoCancel, "Press Yes to load the sav at 0x3000", "Press No for the one at 0x82000"); - int savshift = 0; - if (sdr == DialogResult.Yes) - savshift += 0x7F000; if (sdr == DialogResult.Cancel) return; + int savshift = sdr == DialogResult.Yes ? 0 : 0x7F000; byte[] psdata = input.Skip(0x5400 + savshift).Take(SAV6.SIZE_ORAS).ToArray(); if (BitConverter.ToUInt32(psdata, psdata.Length - 0x1F0) != SAV6.BEEF) Array.Resize(ref psdata, SAV6.SIZE_XY);