Update 1MB invalid savefile message

trickles down to memcard, which is still invalid. Use a more generic
message if a memcard is the same size as a regular savefile.
This commit is contained in:
Kurt 2019-01-22 19:32:22 -08:00
parent 13090c0ced
commit 13c13d5f49
3 changed files with 2 additions and 3 deletions

View file

@ -671,7 +671,7 @@ namespace PKHeX.Core
/// </summary>
/// <param name="size">Size in bytes of the save data</param>
/// <returns>A boolean indicating whether or not the save data size is valid.</returns>
private static bool IsSizeValid(int size) => SIZES.Contains(size);
public static bool IsSizeValid(int size) => SIZES.Contains(size);
/// <summary>Calculates the CRC16-CCITT checksum over an input byte array.</summary>
/// <param name="data">Input byte array</param>

View file

@ -44,7 +44,6 @@ namespace PKHeX.Core
#region Main Window
public static string MsgFileLoad { get; set; } = "File Loaded:";
// ReSharper disable once UnusedMember.Global -- used only for release
public static string MsgFileLoadFail { get; set; } = "Unable to load file.";
public static string MsgFileLoadFailAuto { get; set; } = "An error occurred while attempting to auto-load your save file.";
public static string MsgFileLoadFailAutoAdvise { get; set; } = "It is advised to manually remove bad filenames from the folder.";

View file

@ -677,7 +677,7 @@ namespace PKHeX.WinForms
var state = MC.GetMemoryCardState();
switch (state)
{
default: { WinFormsUtil.Error(MsgFileGameCubeBad, path); return false; }
default: { WinFormsUtil.Error(!SaveUtil.IsSizeValid(MC.Data.Length) ? MsgFileGameCubeBad : MsgFileLoadSaveLoadFail, path); return false; }
case GCMemoryCardState.NoPkmSaveGame: { WinFormsUtil.Error(MsgFileGameCubeNoGames, path); return false; }
case GCMemoryCardState.DuplicateCOLO:
case GCMemoryCardState.DuplicateXD: