Minor fix: guest list not contain any guest. (#4016)

Mistake that I made accidentally in #4006, caused because selected page takes the -1 value if the num of pages is 0 (it only happens if the num of guests is 0).
This commit is contained in:
Josue Acevedo 2016-07-08 16:57:26 -05:00 committed by Michael Steenbeek
parent 9af54d0fd7
commit bfce74f905
1 changed files with 3 additions and 1 deletions

View File

@ -437,7 +437,9 @@ static void window_guest_list_scrollgetsize(rct_window *w, int scrollIndex, int
y = numGuests * 10;
RCT2_GLOBAL(0x00F1EE09, uint32) = numGuests;
_window_guest_list_num_pages = (int) ceilf((float)numGuests / 3173);
if (_window_guest_list_selected_page >= _window_guest_list_num_pages)
if (_window_guest_list_num_pages == 0)
_window_guest_list_selected_page = 0;
else if (_window_guest_list_selected_page >= _window_guest_list_num_pages)
_window_guest_list_selected_page = _window_guest_list_num_pages - 1;
break;
case PAGE_SUMMARISED: