Browse Source

LPARAM and WPARAM have different types on Win32 and Win64

Solve it by casting to the larger of the two, i.e. 64-bit.
tags/v1.4.90
Pierre Ossman 9 years ago
parent
commit
40e3ceb007
2 changed files with 4 additions and 2 deletions
  1. 2
    1
      win/rfb_win32/Clipboard.cxx
  2. 2
    1
      win/rfb_win32/WMShatter.cxx

+ 2
- 1
win/rfb_win32/Clipboard.cxx View File

@@ -96,7 +96,8 @@ Clipboard::processMessage(UINT msg, WPARAM wParam, LPARAM lParam) {
switch (msg) {

case WM_CHANGECBCHAIN:
vlog.debug("change clipboard chain (%x, %x)", wParam, lParam);
vlog.debug("change clipboard chain (%I64x, %I64x)",
(long long)wParam, (long long)lParam);
if ((HWND) wParam == next_window)
next_window = (HWND) lParam;
else if (next_window != 0)

+ 2
- 1
win/rfb_win32/WMShatter.cxx View File

@@ -37,7 +37,8 @@ rfb::win32::IsSafeWM(HWND window, UINT msg, WPARAM wParam, LPARAM lParam) {
break;
};
if (!result) {
vlog.info("IsSafeWM: 0x%x received 0x%x(%u, %lu) - not safe", window, msg, wParam, lParam);
vlog.info("IsSafeWM: 0x%p received 0x%x(%I64u, %I64u) - not safe",
window, msg, (long long)wParam, (long long)lParam);
}
return result;
}

Loading…
Cancel
Save