http://bugs.winehq.org/show_bug.cgi?id=16195
--- Comment #8 from Tahtu winehq.5.tahtu@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