From 472d54d7c9a13ae1303088ed2a7dc33018422983 Mon Sep 17 00:00:00 2001 From: Don HO Date: Sat, 9 Jul 2016 16:47:09 +0200 Subject: [PATCH] Fix crash in x64 due to C style cast --- PowerEditor/src/WinControls/StaticDialog/StaticDialog.cpp | 6 +++--- PowerEditor/visual.net/notepadPlus.vcxproj | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/PowerEditor/src/WinControls/StaticDialog/StaticDialog.cpp b/PowerEditor/src/WinControls/StaticDialog/StaticDialog.cpp index 281d7c92..12da65bf 100644 --- a/PowerEditor/src/WinControls/StaticDialog/StaticDialog.cpp +++ b/PowerEditor/src/WinControls/StaticDialog/StaticDialog.cpp @@ -125,18 +125,18 @@ HGLOBAL StaticDialog::makeRTLResource(int dialogID, DLGTEMPLATE **ppMyDlgTemplat if (!hDlgTemplate) return NULL; - DLGTEMPLATE *pDlgTemplate = (DLGTEMPLATE *)::LockResource(hDlgTemplate); + DLGTEMPLATE *pDlgTemplate = reinterpret_cast(::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(::GlobalLock(hMyDlgTemplate)); ::memcpy(*ppMyDlgTemplate, pDlgTemplate, sizeDlg); - DLGTEMPLATEEX *pMyDlgTemplateEx = (DLGTEMPLATEEX *)*ppMyDlgTemplate; + DLGTEMPLATEEX *pMyDlgTemplateEx = reinterpret_cast(*ppMyDlgTemplate); if (pMyDlgTemplateEx->signature == 0xFFFF) pMyDlgTemplateEx->exStyle |= WS_EX_LAYOUTRTL; else diff --git a/PowerEditor/visual.net/notepadPlus.vcxproj b/PowerEditor/visual.net/notepadPlus.vcxproj index a2adbae6..19c7d96c 100755 --- a/PowerEditor/visual.net/notepadPlus.vcxproj +++ b/PowerEditor/visual.net/notepadPlus.vcxproj @@ -188,7 +188,7 @@ 1.0 1 - true + false $(OutDir)npp.pdb Windows true @@ -239,7 +239,7 @@ copy ..\src\contextMenu.xml ..\bin\contextMenu.xml 1 - true + false $(OutDir)npp.pdb Windows true