riched20: Remove no-op addition with 0 (PVS-Studio)

Michael Stefaniuc mstefani at redhat.de
Wed Feb 25 03:36:51 CST 2015


---
That's the first use of nMatched after it was initialized to 0.



 dlls/riched20/editor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c
index 7632d47..4da2369 100644
--- a/dlls/riched20/editor.c
+++ b/dlls/riched20/editor.c
@@ -1870,7 +1870,7 @@ ME_FindText(ME_TextEditor *editor, DWORD flags, const CHARRANGE *chrg, const WCH
       if (nCurEnd == 0)
       {
         ME_PrevRun(&pCurPara, &pCurItem);
-        nCurEnd = pCurItem->member.run.len + nMatched;
+        nCurEnd = pCurItem->member.run.len;
       }
 
       while (pCurItem && ME_CharCompare( *get_text( &pCurItem->member.run, nCurEnd - nMatched - 1 ),
-- 
1.9.3



More information about the wine-patches mailing list