diff options
author | Pierre Ossman <ossman@cendio.se> | 2015-03-03 16:48:36 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2015-03-03 16:48:36 +0100 |
commit | b0a8047bba02b10b687048f7191824e010ec38da (patch) | |
tree | 74458fc5992bfc0b68d2c1f3984200a3af2eb413 /win/winvnc | |
parent | 6e538b4020be19a4381830b5d5d3d06bc4d7e841 (diff) | |
download | tigervnc-b0a8047bba02b10b687048f7191824e010ec38da.tar.gz tigervnc-b0a8047bba02b10b687048f7191824e010ec38da.zip |
Don't shove a pointer into a 32-bit variable
Diffstat (limited to 'win/winvnc')
-rw-r--r-- | win/winvnc/ControlPanel.cxx | 5 | ||||
-rw-r--r-- | win/winvnc/STrayIcon.cxx | 2 |
2 files changed, 3 insertions, 4 deletions
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); |