aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorwhiterandrek2018-05-22 09:21:43 +0300
committerEugene Sandulenko2018-06-28 23:51:32 +0200
commit2bb2834782142dbece2be2f5cb3416d3ee5395ae (patch)
tree43b4ae4c068f406150f552b30209f1bb1c345147 /engines
parentd3d7a9280081ad6711b8f5ae09100b4368768faf (diff)
downloadscummvm-rg350-2bb2834782142dbece2be2f5cb3416d3ee5395ae.tar.gz
scummvm-rg350-2bb2834782142dbece2be2f5cb3416d3ee5395ae.tar.bz2
scummvm-rg350-2bb2834782142dbece2be2f5cb3416d3ee5395ae.zip
PINK: fix compiler warning about UB
Diffstat (limited to 'engines')
-rw-r--r--engines/pink/objects/inventory.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/pink/objects/inventory.cpp b/engines/pink/objects/inventory.cpp
index c2ad3bb0a7..677b18fb8f 100644
--- a/engines/pink/objects/inventory.cpp
+++ b/engines/pink/objects/inventory.cpp
@@ -187,7 +187,7 @@ void InventoryMgr::showNextItem(bool direction) {
uint i = 0;
do {
- index = (direction == kLeft) ? --index : ++index;
+ index = (direction == kLeft) ? index - 1 : index + 1;
} while(_items[index % _items.size()]->getCurrentOwner() != _item->getCurrentOwner() && ++i < _items.size());
if (i != _items.size()) {