http://bugs.winehq.org/show_bug.cgi?id=2447
Summary: EM_FINDTEXTEX returns zero for no match Product: Wine Version: unspecified Platform: Other OS/Version: other Status: UNCONFIRMED Severity: normal Priority: P2 Component: wine-gui AssignedTo: wine-bugs@winehq.org ReportedBy: danielgodson@optusnet.com.au
calling CRichEditCtrl::FindText() on an empty control returns 0 when it should return -1.
the following code, which works okay in windows, goes into an infinite loop under wine.
FINDTEXTEX fte = { { 0, GetTextLength() - 1 }, "searchstring", {0, 0} }; long lFind = FindText(FR_WHOLEWORD, &fte);
while (lFind != -1) { ... }
i've added some logic in my code to handle empty contents so this is not an immediate problem. also verified that after the change it ran fine.