mirror of https://github.com/OpenRCT2/OpenRCT2.git
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:
parent
9af54d0fd7
commit
bfce74f905
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue