MBCS to Unicode conversion bugs fixed
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@688 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
c05a873977
commit
06dbc9a22b
2 changed files with 6 additions and 5 deletions
|
@ -52,7 +52,7 @@ void ReadVarLenArr(BYTE* &seeker, char* &readInto) {
|
|||
DWORD dwStrLen = WCStrLen((WCHAR*)arr);
|
||||
readInto = new char[dwStrLen];
|
||||
WideCharToMultiByte(CP_ACP, 0, (WCHAR*)arr, dwStrLen, readInto, dwStrLen, 0, 0);
|
||||
seeker += (dwStrLen)*sizeof(WORD);
|
||||
seeker += (dwStrLen)*sizeof(WCHAR);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -68,8 +68,8 @@ void ReadVarLenArr(BYTE* &seeker, char* &readInto) {
|
|||
seeker += sizeof(WORD); \
|
||||
} \
|
||||
else { \
|
||||
MultiByteToWideChar(CP_ACP, 0, x, -1, (WCHAR*)seeker, dwSize); \
|
||||
seeker += (lstrlen(x)+1)*sizeof(WCHAR); \
|
||||
int us = MultiByteToWideChar(CP_ACP, 0, x, -1, (WCHAR*)seeker, dwSize); \
|
||||
seeker += us*sizeof(WCHAR); \
|
||||
} \
|
||||
else \
|
||||
seeker += sizeof(WORD);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue