mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-10-01 21:46:59 -05:00
Fix 1MB importing opposite
Yes => 0 No => 1 Nobody uses 1MB imports anyway...
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user