From e306b91392fe6cc2ad270a45aac2a918351a1020 Mon Sep 17 00:00:00 2001 From: Dylan Smith Date: Fri, 7 Aug 2009 01:56:50 -0400 Subject: [PATCH] richedit: Avoid comparing padding in cursor structures on memcmp. --- dlls/riched20/caret.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/riched20/caret.c b/dlls/riched20/caret.c index 1cb44bcdbcd..33dbdaf013a 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)