From 6196c6347850551cdb3a13caed65efd502b9710d Mon Sep 17 00:00:00 2001 From: pokecal Date: Mon, 27 Feb 2017 11:50:23 +0900 Subject: [PATCH] Fix FreeSpace flag It is not just a bit flag, also index number. --- PKHeX/Saves/Substructures/Inventory.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PKHeX/Saves/Substructures/Inventory.cs b/PKHeX/Saves/Substructures/Inventory.cs index 0205e9468..c89621c25 100644 --- a/PKHeX/Saves/Substructures/Inventory.cs +++ b/PKHeX/Saves/Substructures/Inventory.cs @@ -98,7 +98,7 @@ public void getPouch7(ref byte[] Data) Index = (int)(val & 0x3FF), Count = (int)(val >> 10 & 0x3FF), New = (val & 0x40000000) != 0, // 30th bit is "NEW" - FreeSpace = (val & 0x100000) != 0, // 22th bit is "FREE SPACE" + FreeSpace = (val >> 20 & 0x3FF) != 0, // "FREE SPACE" sortIndex }; } Items = items;