[Bug 16195] GetKeyNameTextW returns a wrong length
wine-bugs at winehq.org
wine-bugs at winehq.org
Thu Nov 27 01:26:20 CST 2008
http://bugs.winehq.org/show_bug.cgi?id=16195
--- Comment #8 from Tahtu <winehq.5.tahtu at spamgourmet.com> 2008-11-27 01:26:19 ---
(In reply to comment #7)
> (In reply to comment #6)
>
> > int len;
> > len = MultiByteToWideChar(CP_UNIXCP, 0, name, -1, lpBuffer, nSize);
> > lpBuffer[len - 1] = 0;
> > return len;
>
I think this single line should work too:
> > return MultiByteToWideChar(CP_UNIXCP, 0, name, -1, lpBuffer, nSize) - 1;
But it fails on "Control" (result: 9) and "Alt" (result: 5).
> Looks good, please send to wine-patches. You even can eliminate introducing
> 'len' by reusing 'nSize'.
I'm sorry, since you closed an other valid bug reported by my I will not longer
assist the Wine Project: http://bugs.winehq.org/show_bug.cgi?id=16204#c3
--
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