diff options
author | Paul Gilbert | 2016-08-01 20:05:16 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-08-01 20:05:16 -0400 |
commit | 3325d42487d10a533ccf918ef37aa69e545d9ed5 (patch) | |
tree | 5c56950c643dfe58e56b458a7e70faf2a42e03cc /engines/titanic/pet_control | |
parent | 903dc7d1d27ae9bbbca6b768c6511763e9755407 (diff) | |
download | scummvm-rg350-3325d42487d10a533ccf918ef37aa69e545d9ed5.tar.gz scummvm-rg350-3325d42487d10a533ccf918ef37aa69e545d9ed5.tar.bz2 scummvm-rg350-3325d42487d10a533ccf918ef37aa69e545d9ed5.zip |
TITANIC: Fix Coverity warnings
Diffstat (limited to 'engines/titanic/pet_control')
-rw-r--r-- | engines/titanic/pet_control/pet_inventory.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/engines/titanic/pet_control/pet_inventory.cpp b/engines/titanic/pet_control/pet_inventory.cpp index 2fb60bf9a6..55176d8b0e 100644 --- a/engines/titanic/pet_control/pet_inventory.cpp +++ b/engines/titanic/pet_control/pet_inventory.cpp @@ -202,16 +202,15 @@ int CPetInventory::getItemIndex(CGameObject *item) const { CGameObject *CPetInventory::getImage(int index) { if (index >= 0 && index < 46) { - int offset = index - 20; int bits = 0; - switch (offset) { - case 0: + switch (index) { + case 20: bits = 4; break; - case 1: + case 21: bits = 8; break; - case 2: + case 22: bits = 1; break; case 23: |