mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
- Switch to equipped items view when selecting the unequip action - Switch to backpack items view when selecting the equip action Depending on current mode, ViewsEnh::CharacterInventory holds either a list of backpack or equipped items (BACKPACK_MODE/ARMS_MODE). When calling the equip(/unequip) method, the index of the selected equipment from the list is passed. However, these methods always access the backpack(/equipped) item list regardless of the current mode. The use of an invalid index then leads to manipulating the wrong item and/or the use of uninitialized/stale values. This is fixed by setting the appropriate mode before the call.