From 9f3f9f47ad313a3e9b2d71560f8f98df93b54b07 Mon Sep 17 00:00:00 2001 From: Joseph-Eugene Winzer Date: Fri, 1 Sep 2017 12:32:23 +0200 Subject: SUPERNOVA: Limits inventory scroll --- engines/supernova/state.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/supernova/state.cpp b/engines/supernova/state.cpp index 8985f475b9..88957a7c21 100644 --- a/engines/supernova/state.cpp +++ b/engines/supernova/state.cpp @@ -500,7 +500,8 @@ void GameManager::processInput() { if (_inventoryScroll >= 2) _inventoryScroll -= 2; } else if (_mouseField == 769) { - _inventoryScroll += 2; + if (_inventoryScroll < _inventory.getSize() - ARRAYSIZE(_guiInventory)) + _inventoryScroll += 2; } } else if (_mouseClickType == Common::EVENT_RBUTTONUP) { _vm->removeMessage(); -- cgit v1.2.3