[Bug 16195] GetKeyNameTextW returns a wrong length

wine-bugs at winehq.org wine-bugs at winehq.org
Tue Nov 25 15:11:12 CST 2008


http://bugs.winehq.org/show_bug.cgi?id=16195





--- Comment #6 from Tahtu <winehq.5.tahtu at spamgourmet.com>  2008-11-25 15:11:12 ---
I think the fix of this problem based here:
http://source.winehq.org/git/wine.git/?a=blob;f=dlls/winex11.drv/keyboard.c#l2332

Afaik the solution could be a change from

           MultiByteToWideChar(CP_UNIXCP, 0, name, -1, lpBuffer, nSize);
           lpBuffer[nSize - 1] = 0;
           return 1;

to this one:

           int len;

           len = MultiByteToWideChar(CP_UNIXCP, 0, name, -1, lpBuffer, nSize);
           lpBuffer[len - 1] = 0;
           return len;


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