richedit: Prevent an unsigned integer underflow.

This commit is contained in:
Dylan Smith 2009-01-11 02:59:38 -05:00 committed by Alexandre Julliard
parent 8089d980d1
commit ee19ec056a
1 changed files with 1 additions and 1 deletions

View File

@ -1127,7 +1127,7 @@ int ME_GetYScrollPos(ME_TextEditor *editor)
BOOL ME_GetYScrollVisible(ME_TextEditor *editor)
{ /* Returns true if the scrollbar is visible */
return (editor->vert_si.nMax - editor->vert_si.nMin >= max(editor->vert_si.nPage - 1, 0));
return (editor->vert_si.nMax - editor->vert_si.nMin > editor->vert_si.nPage);
}
void ME_EnsureVisible(ME_TextEditor *editor, ME_DisplayItem *pRun)