From: Eli Zaretskii Date: Sat, 21 Jul 2012 19:26:25 +0000 (+0300) Subject: Fix previous change in w32menu.c. X-Git-Tag: emacs-24.2.90~1106 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=37a9eac80c07eec4f17917433bc8c406e812e394;p=emacs.git Fix previous change in w32menu.c. --- diff --git a/src/ChangeLog b/src/ChangeLog index 5f75c69b96a..a1c7eb561a0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -5,7 +5,7 @@ http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00417.html for the reasons. - * w32menu.c (add_menu_item): Cast to UINT_PTR when assigning + * w32menu.c (add_menu_item): Cast to ULONG_PTR when assigning info.dwItemData. Fixes crashes on 64-bit Windows. Suggested by Fabrice Popineau . diff --git a/src/w32menu.c b/src/w32menu.c index a5f4c3881b5..871baedd0d3 100644 --- a/src/w32menu.c +++ b/src/w32menu.c @@ -1536,10 +1536,10 @@ add_menu_item (HMENU menu, widget_value *wv, HMENU item) { /* As of Jul-2012, w32api headers say that dwItemData has DWORD type, but that's a bug: it should actually - be UINT_PTR, which is correct for 32-bit and 64-bit + be ULONG_PTR, which is correct for 32-bit and 64-bit Windows alike. MSVC headers get it right; hopefully, MinGW headers will, too. */ - info.dwItemData = (UINT_PTR) XLI (wv->help); + info.dwItemData = (ULONG_PTR) XLI (wv->help); } if (wv->button_type == BUTTON_TYPE_RADIO) {