5720: Use current backlog page instead of old (fixes #5719) r=Robyt3 a=def-

<!-- What is the motivation for the changes of this pull request -->

## Checklist

- [x] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test (especially base/) or added coverage to integration test
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Dennis Felsing <dennis@felsin9.de>
This commit is contained in:
bors[bot] 2022-08-10 16:03:52 +00:00 committed by GitHub
commit 9548b34e67
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -760,10 +760,8 @@ void CGameConsole::OnRender()
}
static int s_LastActivePage = pConsole->m_BacklogCurPage;
if(pConsole->m_BacklogCurPage == INT_MAX)
s_LastActivePage = INT_MAX;
int TotalPages = 1;
for(int Page = 0; Page <= s_LastActivePage; ++Page, OffsetY = 0.0f)
for(int Page = 0; Page <= maximum(s_LastActivePage, pConsole->m_BacklogCurPage); ++Page, OffsetY = 0.0f)
{
while(pEntry)
{