From b0a8047bba02b10b687048f7191824e010ec38da Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Tue, 3 Mar 2015 16:48:36 +0100 Subject: Don't shove a pointer into a 32-bit variable --- win/winvnc/ControlPanel.cxx | 5 ++--- win/winvnc/STrayIcon.cxx | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'win/winvnc') diff --git a/win/winvnc/ControlPanel.cxx b/win/winvnc/ControlPanel.cxx index 9c850d38..ba6cab2c 100644 --- a/win/winvnc/ControlPanel.cxx +++ b/win/winvnc/ControlPanel.cxx @@ -141,17 +141,16 @@ void ControlPanel::SendCommand(DWORD command, int data) { COPYDATASTRUCT copyData; copyData.dwData = command; - copyData.lpData = 0; getSelConnInfo(); if (data != -1) { ListConnStatus.Copy(&ListSelConn); ListConnStatus.setAllStatus(data); ListConnStatus.setDisable(isItemChecked(IDC_DISABLE_CLIENTS)); - copyData.cbData = (DWORD)((long long)&ListConnStatus); } else { ListConnStatus.Clear(); } - copyData.cbData = (DWORD)((long long)&ListConnStatus); + copyData.cbData = 0; + copyData.lpData = &ListConnStatus; SendMessage(m_hSTIcon, WM_COPYDATA, 0, (LPARAM)©Data); } diff --git a/win/winvnc/STrayIcon.cxx b/win/winvnc/STrayIcon.cxx index b13f3f19..762a56af 100644 --- a/win/winvnc/STrayIcon.cxx +++ b/win/winvnc/STrayIcon.cxx @@ -179,7 +179,7 @@ public: case 2: return thread.server.disconnectClients("IPC disconnect") ? 1 : 0; case 3: - thread.server.setClientsStatus((rfb::ListConnInfo *)command->cbData); + thread.server.setClientsStatus((rfb::ListConnInfo *)command->lpData); case 4: thread.server.getClientsInfo(&LCInfo); CPanel->UpdateListView(&LCInfo); -- cgit v1.2.3