Skip to content

Commit

Permalink
Fixed|libcommon: Updating the ready item of the inventory
Browse files Browse the repository at this point in the history
It appears P_GetInvItem() was being called with an invalid parameter.
  • Loading branch information
skyjake committed Jul 23, 2013
1 parent dd2699f commit c1e08f8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions doomsday/plugins/common/src/hu_inventory.c
Expand Up @@ -711,10 +711,9 @@ boolean Hu_InventoryMove(int player, int dir, boolean canWrap, boolean silent)
rebuildInventory(inv);
}

if(inv->numOwnedItemTypes > 1)
if(inv->numOwnedItemTypes >= 1)
{
P_InventorySetReadyItem(player,
P_GetInvItem(inv->selected)->type);
P_InventorySetReadyItem(player, P_GetInvItem(inv->slots[inv->selected])->type);
}

if(!silent)
Expand Down

0 comments on commit c1e08f8

Please sign in to comment.