argument size should be specified in TCHARs according to MSDN

metadata
Wenzel Jakob 2012-10-02 17:21:35 -04:00
parent de9f47ce5a
commit 17ea59e43f
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ FileResolver::FileResolver() {
MTS_AUTORELEASE_END() MTS_AUTORELEASE_END()
#elif defined(__WINDOWS__) #elif defined(__WINDOWS__)
WCHAR lpFilename[MAX_PATH]; WCHAR lpFilename[MAX_PATH];
const DWORD nSize = static_cast<DWORD>(sizeof(lpFilename)/sizeof(WCHAR)); const DWORD nSize = static_cast<DWORD>(sizeof(lpFilename)/sizeof(TCHAR));
if (GetModuleFileNameW(NULL, lpFilename, nSize) != 0 && if (GetModuleFileNameW(NULL, lpFilename, nSize) != 0 &&
GetLastError() == ERROR_SUCCESS) GetLastError() == ERROR_SUCCESS)
prependPath(fs::path(lpFilename).parent_path()); prependPath(fs::path(lpFilename).parent_path());