From 1992f36c5b0be470fdfa184e005c7b777c810d72 Mon Sep 17 00:00:00 2001 From: Kurt Date: Sun, 9 Jan 2022 20:34:55 -0800 Subject: [PATCH] Fix gen3 item quantity reads Oops :) Closes #3369 ty @MichiS97 ! --- PKHeX.Core/Saves/Substructures/Inventory/InventoryPouch3.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PKHeX.Core/Saves/Substructures/Inventory/InventoryPouch3.cs b/PKHeX.Core/Saves/Substructures/Inventory/InventoryPouch3.cs index d69618ee4..6a0165dd6 100644 --- a/PKHeX.Core/Saves/Substructures/Inventory/InventoryPouch3.cs +++ b/PKHeX.Core/Saves/Substructures/Inventory/InventoryPouch3.cs @@ -22,7 +22,7 @@ public override void GetPouch(ReadOnlySpan data) items[i] = new InventoryItem { Index = ReadUInt16LittleEndian(entry), - Count = ReadUInt16LittleEndian(entry[..2]) ^ (ushort) SecurityKey, + Count = ReadUInt16LittleEndian(entry[2..]) ^ (ushort) SecurityKey, }; } Items = items;