[Bug 39667] dinput: MotoGP 3 demo launcher crashes on leaving key configuration dialog.

wine-bugs at winehq.org wine-bugs at winehq.org
Tue Mar 8 14:56:10 CST 2016


https://bugs.winehq.org/show_bug.cgi?id=39667

Andrew Eikum <aeikum at codeweavers.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aeikum at codeweavers.com

--- Comment #3 from Andrew Eikum <aeikum at codeweavers.com> ---
Looking at the patch wine <wine-staging:87f68ad2f>. Some feedback:

> +    static const WCHAR emptyW[] = { 0 };

This seems unnecessary. Just assign \0 to dps.wsz[0] or do the strcpy.

> +            ps->wsz[0] = 0;
> +            if (This->username)
> +                lstrcpynW(ps->wsz, This->username, sizeof(ps->wsz)/sizeof(WCHAR));

Similar here, no need to assign if This->username is non-NULL.

> +            This->username[0] = 0;
> +            if (ps->wsz)
> +                lstrcpynW(This->username, ps->wsz, sizeof(ps->wsz)/sizeof(WCHAR));

And here.

> +    WCHAR                      *username;    /* set by 'SetActionMap' */

I'm OK with this as it is, but I would rather allocate the char array as part
of the IDirectInputDeviceImpl struct instead of allocating and freeing it
separately.

> +        ok (SUCCEEDED(hr), "GetProperty failed hr=%08x\n", hr);

These should be "hr == S_OK" or similar.

-- 
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