shell32: In SHNameTranslate use the right part of the string for sizing.

oldstable
Aric Stewart 2007-08-14 14:23:15 -05:00 committed by Alexandre Julliard
parent 76195d9a49
commit fdd42046fb
1 changed files with 1 additions and 1 deletions

View File

@ -830,7 +830,7 @@ static DWORD SHNameTranslate(LPWSTR* wString, LPCWSTR* pWToFrom, BOOL more)
aString += size;
} while ((size != 1) && more);
/* The two sizes might be different in the case of multibyte chars */
size = MultiByteToWideChar(CP_ACP, 0, aString, aSize, *wString, 0);
size = MultiByteToWideChar(CP_ACP, 0, (LPCSTR)*pWToFrom, aSize, *wString, 0);
if (*wString) /* only in the second loop */
{
MultiByteToWideChar(CP_ACP, 0, (LPCSTR)*pWToFrom, aSize, *wString, size);