Dylan Smith : richedit: Prevent an unsigned integer underflow.
Alexandre Julliard
julliard at winehq.org
Mon Jan 12 10:41:13 CST 2009
Module: wine
Branch: master
Commit: ee19ec056a417fbd705f62b3ccd392023bcfe8ae
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ee19ec056a417fbd705f62b3ccd392023bcfe8ae
Author: Dylan Smith <dylan.ah.smith at gmail.com>
Date: Sun Jan 11 02:59:38 2009 -0500
richedit: Prevent an unsigned integer underflow.
---
dlls/riched20/paint.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/riched20/paint.c b/dlls/riched20/paint.c
index f0acf4a..b6430e4 100644
--- a/dlls/riched20/paint.c
+++ b/dlls/riched20/paint.c
@@ -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)
More information about the wine-cvs
mailing list