On Sat, Jul 02, 2011 at 11:49:44AM +0300, Alex Stanev wrote:
dlls/advapi32/advapi.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/advapi32/advapi.c b/dlls/advapi32/advapi.c index e135fa5..7025a21 100644 --- a/dlls/advapi32/advapi.c +++ b/dlls/advapi32/advapi.c @@ -65,7 +65,7 @@ GetUserNameA( LPSTR lpszName, LPDWORD lpSize )
ret = GetUserNameW( buffer, &sizeW ); if (ret)
WideCharToMultiByte( CP_ACP, 0, buffer, -1, lpszName, *lpSize, NULL, NULL );
else *lpSize = sizeW;*lpSize = WideCharToMultiByte( CP_ACP, 0, buffer, -1, lpszName, *lpSize, NULL, NULL );
For completeness, the else part also needs to convert the wide character cound in "sizeW" to the A character cound in *lpSize.
Not sure how though.
Ciao, Marcus