Fix pageCount calculation

This commit is contained in:
jflyper 2017-05-01 10:40:44 +09:00
parent b10412ac9b
commit 4c114db666
1 changed files with 1 additions and 1 deletions

View File

@ -493,7 +493,7 @@ static void cmsMenuCountPage(displayPort_t *pDisplay)
{
OSD_Entry *p;
for (p = currentCtx.menu->entries; p->type != OME_END; p++);
pageCount = (p - currentCtx.menu->entries) / MAX_MENU_ITEMS(pDisplay) + 1;
pageCount = (p - currentCtx.menu->entries - 1) / MAX_MENU_ITEMS(pDisplay) + 1;
}
long cmsMenuChange(displayPort_t *pDisplay, const void *ptr)