1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 04:15:44 +03:00

Fix pageMaxRow use before update (#8222)

Fix pageMaxRow use before update
This commit is contained in:
Michael Keller 2019-05-09 14:53:15 +12:00 committed by GitHub
commit a4ac70bd95
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);
}