Skip to content

Commit

Permalink
Inventory: fixed the size of ItemTypes to be as advertised
Browse files Browse the repository at this point in the history
shoudl also fix coverity 4424
  • Loading branch information
lynxlynxlynx committed Aug 8, 2013
1 parent 69738d9 commit d84df10
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gemrb/core/Inventory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ void Inventory::AddSlotEffects(ieDword index)
ItemExcl|=itm->ItemExcl;
ieDword pos = itm->ItemType/32;
ieDword bit = itm->ItemType%32;
if (pos<4) {
if (pos<8) {
ItemTypes[pos]|=1<<bit;
}

Expand Down
2 changes: 1 addition & 1 deletion gemrb/core/Inventory.h
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ class GEM_EXPORT Inventory {
ieWord EquippedHeader;
/** this isn't saved */
ieDword ItemExcl;
ieDword ItemTypes[4]; //256 bits
ieDword ItemTypes[8]; //256 bits
public:
Inventory();
virtual ~Inventory();
Expand Down

0 comments on commit d84df10

Please sign in to comment.