From 1734e7b0556b5cba064b919deaed0342157ad749 Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Fri, 23 May 2025 08:48:31 -0500 Subject: [PATCH] Fix Load screen with no parties in save folder (#740) --- src/game/boe.dlgutil.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/boe.dlgutil.cpp b/src/game/boe.dlgutil.cpp index b5b9efd0..04abe5ec 100644 --- a/src/game/boe.dlgutil.cpp +++ b/src/game/boe.dlgutil.cpp @@ -1889,7 +1889,7 @@ class cFilePicker { save_files.resize(save_file_mtimes.size()); cStack& stk = get_stack(); - int num_pages = ceil((float)save_file_mtimes.size() / parties_per_page); + int num_pages = max(1, ceil((float)save_file_mtimes.size() / parties_per_page)); stk.setPageCount(num_pages); // HACK: For some reason which should be fixed, the buttons and labels on subsequent pages // aren't getting text on the static buttons and labels