Commit ee19ec05 authored by Dylan Smith's avatar Dylan Smith Committed by Alexandre Julliard

richedit: Prevent an unsigned integer underflow.

parent 8089d980
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment