Skip to content

Commit

Permalink
Fix cases that don't have 25 options
Browse files Browse the repository at this point in the history
  • Loading branch information
OoLunar committed Jan 27, 2025
1 parent 2ed1845 commit f8b1bfa
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ private static int CalculatePageCount(int startingIndex, int totalPageCount)
if (startingIndex == 0)
{
// Return 24 so that the "Next Section" button is added.
return totalPageCount > 25 ? 24 : 25;
return totalPageCount > 25 ? 24 : Math.Min(24, totalPageCount);
}

// Return 23 so that the "Previous Section" and "Next Section" buttons are added.
Expand Down

0 comments on commit f8b1bfa

Please sign in to comment.