Fix 1MB importing opposite

Yes => 0
No => 1
Nobody uses 1MB imports anyway...
This commit is contained in:
Kaphotics 2016-02-09 15:37:12 -08:00
parent da862c2ae5
commit 9f6e31f6eb

View File

@ -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);