From 2bb2834782142dbece2be2f5cb3416d3ee5395ae Mon Sep 17 00:00:00 2001 From: whiterandrek Date: Tue, 22 May 2018 09:21:43 +0300 Subject: PINK: fix compiler warning about UB --- engines/pink/objects/inventory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines') 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()) { -- cgit v1.2.3