mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-25 05:25:14 +00:00
Correct off-by-one error in paginated display count
This commit is contained in:
parent
865d17b512
commit
b674304ddd
1 changed files with 1 additions and 1 deletions
|
@ -26,7 +26,7 @@ static s32 djui_paginated_get_count(struct DjuiPaginated* paginated) {
|
|||
void djui_paginated_update_page_buttons(struct DjuiPaginated* paginated) {
|
||||
s32 count = djui_paginated_get_count(paginated);
|
||||
char pageNumString[32] = { 0 };
|
||||
snprintf(pageNumString, 32, "%d/%d", paginated->startIndex / paginated->showCount + 1, count / paginated->showCount + 1);
|
||||
snprintf(pageNumString, 32, "%d/%d", paginated->startIndex / paginated->showCount + 1, (count - 1) / paginated->showCount + 1);
|
||||
djui_text_set_text(sPageNumText, pageNumString);
|
||||
djui_base_set_visible(&sPageNumText->base, (count > paginated->showCount));
|
||||
|
||||
|
|
Loading…
Reference in a new issue