From 58bd3640b4ddec53267980a3bf17546c027bc2b2 Mon Sep 17 00:00:00 2001 From: Kurt Date: Tue, 28 Feb 2017 23:13:23 -0800 Subject: [PATCH] Fix order of operation Closes #909 yeah bit shifts are after +/- silly me --- PKHeX/Saves/SAV4.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PKHeX/Saves/SAV4.cs b/PKHeX/Saves/SAV4.cs index 8cab4befc..75a7ff4b9 100644 --- a/PKHeX/Saves/SAV4.cs +++ b/PKHeX/Saves/SAV4.cs @@ -759,7 +759,7 @@ protected override void setDex(PKM pkm) const int brSize = 0x40; int bit = pkm.Species - 1; byte mask = (byte) (1 << (bit&7)); - int ofs = PokeDex + bit>>3 + 0x4; + int ofs = PokeDex + (bit>>3) + 0x4; // Set the Species Owned Flag Data[ofs + brSize*0] |= mask;