Unicode to MBCS conversion bugs fixed

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@689 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2002-08-16 09:36:46 +00:00
parent 06dbc9a22b
commit d9285b2cbf
2 changed files with 8 additions and 7 deletions

View file

@ -49,10 +49,10 @@ void ReadVarLenArr(BYTE* &seeker, char* &readInto) {
break;
default:
{
DWORD dwStrLen = WCStrLen((WCHAR*)arr);
readInto = new char[dwStrLen];
WideCharToMultiByte(CP_ACP, 0, (WCHAR*)arr, dwStrLen, readInto, dwStrLen, 0, 0);
seeker += (dwStrLen)*sizeof(WCHAR);
int iStrLen = WideCharToMultiByte(CP_ACP, 0, (WCHAR*)arr, -1, 0, 0, 0, 0);
readInto = new char[iStrLen];
WideCharToMultiByte(CP_ACP, 0, (WCHAR*)arr, -1, readInto, iStrLen, 0, 0);
seeker += WCStrLen((WCHAR*)arr)*sizeof(WCHAR);
}
break;
}