From fdd42046fb58516e54dffdc23b6c6ff70d673265 Mon Sep 17 00:00:00 2001 From: Aric Stewart Date: Tue, 14 Aug 2007 14:23:15 -0500 Subject: [PATCH] shell32: In SHNameTranslate use the right part of the string for sizing. --- dlls/shell32/shlfileop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/shell32/shlfileop.c b/dlls/shell32/shlfileop.c index c820569ef9c..87bf6775839 100644 --- a/dlls/shell32/shlfileop.c +++ b/dlls/shell32/shlfileop.c @@ -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); -- 2.11.4.GIT