mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-10 06:34:19 +00:00
Sanity check save file personal info
https://projectpokemon.org/home/forums/topic/65409-2-exception-logs-found-on-latest-pkhex/?do=findComment&comment=290422
This commit is contained in:
parent
66e8bf2645
commit
3f49a01ae8
2 changed files with 5 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
//#define SUPPRESS
|
||||
#define SUPPRESS
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
|
|
@ -110,7 +110,10 @@ public static class SpriteUtil
|
|||
}
|
||||
if (flagIllegal)
|
||||
{
|
||||
var la = new LegalityAnalysis(pk, sav.Personal, storage);
|
||||
var la = pk.GetType() == sav.PKMType // quick sanity check
|
||||
? new LegalityAnalysis(pk, sav.Personal, storage)
|
||||
: new LegalityAnalysis(pk, pk.PersonalInfo, storage);
|
||||
|
||||
if (!la.Valid)
|
||||
sprite = ImageUtil.LayerImage(sprite, Resources.warn, 0, FlagIllegalShiftY);
|
||||
else if (pk.Format >= 8 && MoveInfo.IsDummiedMoveAny(pk))
|
||||
|
|
Loading…
Reference in a new issue