diff options
author | whiterandrek | 2018-05-22 09:21:43 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2018-06-28 23:51:32 +0200 |
commit | 2bb2834782142dbece2be2f5cb3416d3ee5395ae (patch) | |
tree | 43b4ae4c068f406150f552b30209f1bb1c345147 /engines | |
parent | d3d7a9280081ad6711b8f5ae09100b4368768faf (diff) | |
download | scummvm-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.cpp | 2 |
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()) { |