From 99ea81de15a61bad684757f747bbd522246aaad6 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 15 Jul 2008 15:22:23 +0000 Subject: [PATCH] don't pass pointers to unaligned DWORDs to avoid 64 bit build problems (#9726) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54639 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/toplevel.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/msw/toplevel.cpp b/src/msw/toplevel.cpp index a75e3e94cc..faa55fe617 100644 --- a/src/msw/toplevel.cpp +++ b/src/msw/toplevel.cpp @@ -545,7 +545,13 @@ bool wxTopLevelWindowMSW::Create(wxWindow *parent, // reuse the code in MSWGetStyle() but correct the results slightly for // the dialog - dlgTemplate->style = MSWGetStyle(style, &dlgTemplate->dwExtendedStyle); + // + // NB: we need a temporary variable as we can't pass pointer to + // dwExtendedStyle directly, it's not aligned correctly for 64 bit + // architectures + WXDWORD dwExtendedStyle; + dlgTemplate->style = MSWGetStyle(style, &dwExtendedStyle); + dlgTemplate->dwExtendedStyle = dwExtendedStyle; // all dialogs are popups dlgTemplate->style |= WS_POPUP; -- 2.45.2