limit MultiByteToWideChar to the real size available, not the total
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4135 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
4ecca13fcd
commit
bfc2b56cbf
1 changed files with 1 additions and 1 deletions
|
@ -83,7 +83,7 @@ void ReadVarLenArr(LPBYTE &seeker, char* &readInto, unsigned int uCodePage) {
|
|||
seeker += sizeof(WORD); \
|
||||
} \
|
||||
else { \
|
||||
int us = MultiByteToWideChar(m_uCodePage, 0, x, -1, (WCHAR*)seeker, dwSize); \
|
||||
int us = MultiByteToWideChar(m_uCodePage, 0, x, -1, (WCHAR*)seeker, dwSize - DWORD(seeker - pbDlg)); \
|
||||
if (!us) { \
|
||||
throw runtime_error("WriteStringOrId - Unicode conversion failed."); \
|
||||
} \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue