mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-08-25 13:54:06 -05:00
Fix ramsav loading logic
Since ramsavloaded was defined when loading (and removed), we need to define the ramsav before loading it. Fix for checksum button.
This commit is contained in:
@@ -575,8 +575,9 @@ private void openFile(byte[] input, string path, string ext)
|
||||
if (BitConverter.ToUInt32(input, i) == 0x42454546) { Array.Resize(ref input, 0x70000); break; }
|
||||
|
||||
bool o = (input.Length == 0x80000);
|
||||
try { openMAIN(ram2sav.getMAIN(input), path, (o) ? "ORAS" : "XY", o, true); } catch { return; }
|
||||
ramsav = (byte[])input.Clone();
|
||||
try { openMAIN(ram2sav.getMAIN(input), path, (o) ? "ORAS" : "XY", o, true); }
|
||||
catch { ramsav = null; return; }
|
||||
}
|
||||
#endregion
|
||||
#region Battle Video
|
||||
@@ -687,7 +688,7 @@ private void openSave(bool oras)
|
||||
savedited = false;
|
||||
Menu_ToggleBoxUI.Visible = false;
|
||||
|
||||
B_VerifyCHK.Enabled = ramsav != null;
|
||||
B_VerifyCHK.Enabled = ramsav == null;
|
||||
DaycareSlot = 0;
|
||||
|
||||
setBoxNames(); // Display the Box Names
|
||||
|
||||
Reference in New Issue
Block a user