CResourceDirectoryEntry::GetName() does not need to duplicate the string

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6603 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2015-09-06 20:15:56 +00:00
parent 1f8866ccd8
commit e58680c996
2 changed files with 4 additions and 12 deletions

View file

@ -24,7 +24,7 @@ void __declspec(dllexport) myFunction(HWND hwndParent, int string_size,
// do your stuff here
{
LPTSTR msgbuf = GlobalAlloc(GPTR, (3 + string_size + 1) * sizeof(*msgbuf));
LPTSTR msgbuf = (LPTSTR) GlobalAlloc(GPTR, (3 + string_size + 1) * sizeof(*msgbuf));
if (msgbuf)
{
wsprintf(msgbuf, TEXT("$0=%s"), getuservariable(INST_0));