Thanks goes to I_Kill_Bugs for the patch (and partly to Kyle Katarn for the PR) and Hermes for tweaking the patch code. Had to make a commit myself as the PR author's account is deleted.
Signed-off by: I_Kill_Bugs (original patch author)
Signed-off by: Kyle Katarn <contact@kcsoftwares.com>
Signed-off by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
if (lpsi->fMask & (SIF_RANGE | SIF_PAGE | SIF_DISABLENOSCROLL))
{
new_flags = Window->pSBInfo->WSBflags;
- if (Info->nMin >= (int)(Info->nMax - max(Info->nPage - 1, 0)))
+ if (Info->nMin + (int)max(Info->nPage, 1) > Info->nMax)
{
/* Hide or disable scroll-bar */
if (lpsi->fMask & SIF_DISABLENOSCROLL)