mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
NEVERHOOD: Fix 2 off-by-one errors in the savegame slot selection box
This commit is contained in:
@@ -821,7 +821,7 @@ void SavegameListBox::scrollUp() {
|
||||
}
|
||||
|
||||
void SavegameListBox::scrollDown() {
|
||||
if (_lastVisibleItem < (int)_textLabelItems.size()) {
|
||||
if (_lastVisibleItem < (int)_textLabelItems.size() - 1) {
|
||||
++_firstVisibleItem;
|
||||
++_lastVisibleItem;
|
||||
refresh();
|
||||
@@ -838,7 +838,7 @@ void SavegameListBox::pageUp() {
|
||||
}
|
||||
|
||||
void SavegameListBox::pageDown() {
|
||||
int amount = MIN((int)_textLabelItems.size() - _lastVisibleItem, _maxVisibleItemsCount);
|
||||
int amount = MIN((int)_textLabelItems.size() - _lastVisibleItem - 1, _maxVisibleItemsCount);
|
||||
if (amount > 0) {
|
||||
_firstVisibleItem += amount;
|
||||
_lastVisibleItem += amount;
|
||||
|
||||
Reference in New Issue
Block a user