Dylan Smith : richedit: Avoid comparing padding in cursor structures on memcmp.
Alexandre Julliard
julliard at winehq.org
Fri Aug 7 08:49:39 CDT 2009
Module: wine
Branch: master
Commit: e306b91392fe6cc2ad270a45aac2a918351a1020
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e306b91392fe6cc2ad270a45aac2a918351a1020
Author: Dylan Smith <dylan.ah.smith at gmail.com>
Date: Fri Aug 7 01:56:50 2009 -0400
richedit: Avoid comparing padding in cursor structures on memcmp.
---
dlls/riched20/caret.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/dlls/riched20/caret.c b/dlls/riched20/caret.c
index 1cb44bc..33dbdaf 100644
--- a/dlls/riched20/caret.c
+++ b/dlls/riched20/caret.c
@@ -1493,7 +1493,8 @@ static void ME_ArrowCtrlEnd(ME_TextEditor *editor, ME_Cursor *pCursor)
BOOL ME_IsSelection(ME_TextEditor *editor)
{
- return memcmp(&editor->pCursors[0], &editor->pCursors[1], sizeof(ME_Cursor))!=0;
+ return editor->pCursors[0].pRun != editor->pCursors[1].pRun ||
+ editor->pCursors[0].nOffset != editor->pCursors[1].nOffset;
}
static int ME_GetSelCursor(ME_TextEditor *editor, int dir)
More information about the wine-cvs
mailing list