SIGN IN SIGN UP

Widen InventoryUserUIInterfaceEntry stack indices to 16 bits

Each entry in an inventory menu lists the stacks it shows, by each stack's position in the item's stack list. One entry can cover several stacks. The engine stores each position in 2 bytes, but they were declared as 1 byte. So stackIndex[1] was read just 1 byte into the list, which is still inside the first position, and usually came out as 0. A position above 255 needs both of its bytes, so it came out wrong too.

The game's own code reads these numbers 2 bytes at a time, both in InventoryItemDisplayData's constructor and in the function that adds up an entry's item count. In the disassembly this shows up as word ptr reads, and a word is 2 bytes.
H
hxef committed
db5f09f3e73657e8ca6128bb81139a45daabc2c1
Parent: 626ded2