Skip to content

Commit

Permalink
Fix pageMaxRow use before update (#8222)
Browse files Browse the repository at this point in the history
Fix pageMaxRow use before update
  • Loading branch information
mikeller committed May 9, 2019
2 parents a4aa237 + 711424f commit a4ac70b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/cms/cms.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,13 +250,13 @@ static void cmsPageSelect(displayPort_t *instance, int8_t newpage)
{
currentCtx.page = (newpage + pageCount) % pageCount;
pageTop = &currentCtx.menu->entries[currentCtx.page * maxMenuItems];

cmsUpdateMaxRow(instance);

const OSD_Entry *p;
int i;
for (p = pageTop, i = 0; (p <= pageTop + pageMaxRow); p++, i++) {
runtimeEntryFlags[i] = p->flags;
}
cmsUpdateMaxRow(instance);
displayClearScreen(instance);
}

Expand Down

0 comments on commit a4ac70b

Please sign in to comment.