Fix crash in x64 due to C style cast

pull/2068/head
Don HO 9 years ago
parent 6dab6621ba
commit 472d54d7c9

@ -125,18 +125,18 @@ HGLOBAL StaticDialog::makeRTLResource(int dialogID, DLGTEMPLATE **ppMyDlgTemplat
if (!hDlgTemplate)
return NULL;
DLGTEMPLATE *pDlgTemplate = (DLGTEMPLATE *)::LockResource(hDlgTemplate);
DLGTEMPLATE *pDlgTemplate = reinterpret_cast<DLGTEMPLATE *>(::LockResource(hDlgTemplate));
if (!pDlgTemplate)
return NULL;
// Duplicate Dlg Template resource
unsigned long sizeDlg = ::SizeofResource(_hInst, hDialogRC);
HGLOBAL hMyDlgTemplate = ::GlobalAlloc(GPTR, sizeDlg);
*ppMyDlgTemplate = (DLGTEMPLATE *)::GlobalLock(hMyDlgTemplate);
*ppMyDlgTemplate = reinterpret_cast<DLGTEMPLATE *>(::GlobalLock(hMyDlgTemplate));
::memcpy(*ppMyDlgTemplate, pDlgTemplate, sizeDlg);
DLGTEMPLATEEX *pMyDlgTemplateEx = (DLGTEMPLATEEX *)*ppMyDlgTemplate;
DLGTEMPLATEEX *pMyDlgTemplateEx = reinterpret_cast<DLGTEMPLATEEX *>(*ppMyDlgTemplate);
if (pMyDlgTemplateEx->signature == 0xFFFF)
pMyDlgTemplateEx->exStyle |= WS_EX_LAYOUTRTL;
else

@ -188,7 +188,7 @@
<Version>1.0</Version>
<TypeLibraryFile />
<TypeLibraryResourceID>1</TypeLibraryResourceID>
<GenerateDebugInformation>true</GenerateDebugInformation>
<GenerateDebugInformation>false</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)npp.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
@ -239,7 +239,7 @@ copy ..\src\contextMenu.xml ..\bin\contextMenu.xml
<TypeLibraryFile>
</TypeLibraryFile>
<TypeLibraryResourceID>1</TypeLibraryResourceID>
<GenerateDebugInformation>true</GenerateDebugInformation>
<GenerateDebugInformation>false</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)npp.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>

Loading…
Cancel
Save