From bfce74f905719e1653856a1008ea57c3e55b4502 Mon Sep 17 00:00:00 2001 From: Josue Acevedo Date: Fri, 8 Jul 2016 16:57:26 -0500 Subject: [PATCH] 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). --- src/windows/guest_list.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/windows/guest_list.c b/src/windows/guest_list.c index 530bc434c8..0292d5fed8 100644 --- a/src/windows/guest_list.c +++ b/src/windows/guest_list.c @@ -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: