[Bug 20129] FaleWEB doesn't run on Wine (crashes on startup)
wine-bugs at winehq.org
wine-bugs at winehq.org
Mon Oct 4 13:24:26 CDT 2010
http://bugs.winehq.org/show_bug.cgi?id=20129
--- Comment #9 from Louis Lenders <xerox_xerox2000 at yahoo.co.uk> 2010-10-04 13:24:26 CDT ---
Created an attachment (id=31115)
--> (http://bugs.winehq.org/attachment.cgi?id=31115)
patch + test
Here 's a patch +test. Apparently the problem is with this piece of code:
if (title)
{
while (list[i])
{
if (GetWindowTextW( list[i], buffer, len + 1 ) && !strcmpiW(
buffer, title )) break;
i++;
}
}
retvalue = list[i];
With a NULL pointer for title, the while loop is skipped, but when title is an
empty character, we enter the loop and GetWindowTextW fails (MSDN states that
as well: GetWindoWTextW returns FALSE for empty char) , so i++ is incorrectly
raised to 1, and we end up with a non existing retval = list[1].
I guess there are several ways to fix this, but the easiest is to treat an
empty charcacter as a NULL pointer
--
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.
More information about the wine-bugs
mailing list