Fixed VIAddVersionKey failing on empty inputs
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2881 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
9ad4dd958b
commit
148c9a1b86
2 changed files with 7 additions and 7 deletions
|
@ -73,9 +73,9 @@ void CResourceVersionInfo::SetProductVersion(int HighPart, int LowPart)
|
|||
// Util function - must be freeded
|
||||
WCHAR* StrToWstrAlloc(const char* istr, int codepage)
|
||||
{
|
||||
int strSize = strlen(istr);
|
||||
WCHAR* wstr = new WCHAR[(strSize*2)+1];
|
||||
MultiByteToWideChar(codepage, 0, istr, -1, wstr, strSize*2);
|
||||
int strSize = MultiByteToWideChar(codepage, 0, istr, -1, 0, 0);
|
||||
WCHAR* wstr = new WCHAR[strSize];
|
||||
MultiByteToWideChar(codepage, 0, istr, -1, wstr, strSize);
|
||||
return wstr;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue