From 6e6e6d179f6fc22446af1520c5d04953acb69dc5 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 14 Oct 2013 15:08:40 +0000 Subject: [PATCH] Fix pointer truncation in wxListEvent::GetData() in LLP64 builds. We must use wxUIntPtr and not long here to avoid truncating the upper half of the pointer when sizeof(void*)>sizeof(long). Closes #15578. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75005 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/changes.txt | 4 ++++ include/wx/listbase.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/changes.txt b/docs/changes.txt index d73c20e3a5..e17b388f19 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -568,6 +568,10 @@ All: - Add possibility to validate the input files against a schema to wxrc. - Fix recently broken compilation with Intel compiler. +All (GUI): + +- Fix wxListEvent::GetData() in LLP64 builds. + wxMSW: - Optional better handling of SAFEARRAYs in wxAutomationObject (PB). diff --git a/include/wx/listbase.h b/include/wx/listbase.h index 80f65f2a33..5e6fb7cae3 100644 --- a/include/wx/listbase.h +++ b/include/wx/listbase.h @@ -510,7 +510,7 @@ public: const wxString& GetLabel() const { return m_item.m_text; } const wxString& GetText() const { return m_item.m_text; } int GetImage() const { return m_item.m_image; } - long GetData() const { return static_cast(m_item.m_data); } + wxUIntPtr GetData() const { return m_item.m_data; } long GetMask() const { return m_item.m_mask; } const wxListItem& GetItem() const { return m_item; }