diff --git a/PKHeX.Core/Saves/SAV3.cs b/PKHeX.Core/Saves/SAV3.cs index 22c63a51f..4b51e4968 100644 --- a/PKHeX.Core/Saves/SAV3.cs +++ b/PKHeX.Core/Saves/SAV3.cs @@ -326,7 +326,8 @@ public int Badges switch (Version) { case GameVersion.E: - BitConverter.GetBytes(BitConverter.ToUInt16(Data, BlockOfs[2] + 0x3FC) & ~(0xFF << 7) | (value << 7)).CopyTo(Data, BlockOfs[2] + 0x3FC); + var val = BitConverter.ToUInt16(Data, BlockOfs[2] + 0x3FC) & ~(0xFF << 7) | (value << 7); + BitConverter.GetBytes((ushort)val).CopyTo(Data, BlockOfs[2] + 0x3FC); break; case GameVersion.FRLG: Data[BlockOfs[2] + 0x64] = (byte)value; break; default: return; // RS