mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-08-28 00:44:45 -05:00
fix gen3 once-saved saves
Catch a case that all BitOrder is 0. (after delete all data)
This commit is contained in:
@@ -206,6 +206,8 @@ public static GameVersion getIsG3SAV(byte[] data)
|
||||
// Real 0th block comes before block1.
|
||||
if (BlockOrder[0] == 1 && Block0 != BlockOrder.Length - 1)
|
||||
continue;
|
||||
if (BlockOrder.Count(v => v == 0) == BlockOrder.Length)
|
||||
continue;
|
||||
uint GameCode = BitConverter.ToUInt32(data, Block0 * 0x1000 + 0xAC + ofs);
|
||||
if (GameCode == uint.MaxValue)
|
||||
return GameVersion.Unknown; // what a hack
|
||||
|
||||
Reference in New Issue
Block a user