From e8d583b1deae881ec545e259673cce15fd8c4961 Mon Sep 17 00:00:00 2001 From: suchmememanyskill Date: Tue, 29 Dec 2020 02:21:23 +0100 Subject: [PATCH] display the correct page count --- source/gfx/menu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/gfx/menu.c b/source/gfx/menu.c index afb9e8c..83d5a2c 100644 --- a/source/gfx/menu.c +++ b/source/gfx/menu.c @@ -84,7 +84,7 @@ int newMenu(Vector_t* vec, int startIndex, int screenLenX, int screenLenY, u8 op if (options & ENABLEPAGECOUNT){ SETCOLOR(COLOR_DEFAULT, COLOR_WHITE); char temp[40] = ""; - sprintf(temp, " Page %d / %d | Total %d entries", (selected / screenLenY) + 1, (vec->count / screenLenY) + 1, entryCount); + sprintf(temp, " Page %d / %d | Total %d entries", (selected / screenLenY) + 1, ((vec->count - 1) / screenLenY) + 1, entryCount); gfx_con_setpos(YLEFT - strlen(temp) * 18, 0); gfx_printf(temp); }