#4978 Fixed bad casting on 64bit Windows

This commit is contained in:
Andrew Nelless 2016-06-24 15:38:17 +01:00 committed by Jerry (Xinyu Hou)
parent 04184b51ea
commit e1432f670c
2 changed files with 5 additions and 8 deletions

View File

@ -360,10 +360,9 @@ MSWindowsPortableTaskBarReceiver::staticDlgProc(HWND hwnd,
} }
else { else {
// get the extra window data and forward the call // get the extra window data and forward the call
LONG data = (LONG)GetWindowLongPtr(hwnd, GWLP_USERDATA); LONG_PTR data = GetWindowLongPtr(hwnd, GWLP_USERDATA);
if (data != 0) { if (data != 0) {
self = reinterpret_cast<MSWindowsPortableTaskBarReceiver*>( self = reinterpret_cast<MSWindowsPortableTaskBarReceiver*>(data);
reinterpret_cast<void*>(data));
} }
} }

View File

@ -368,16 +368,14 @@ MSWindowsServerTaskBarReceiver::staticDlgProc(HWND hwnd,
// and put it in the extra window data then forward the call. // and put it in the extra window data then forward the call.
MSWindowsServerTaskBarReceiver* self = NULL; MSWindowsServerTaskBarReceiver* self = NULL;
if (msg == WM_INITDIALOG) { if (msg == WM_INITDIALOG) {
self = reinterpret_cast<MSWindowsServerTaskBarReceiver*>( self = reinterpret_cast<MSWindowsServerTaskBarReceiver*>(lParam);
reinterpret_cast<void*>(lParam));
SetWindowLongPtr(hwnd, GWLP_USERDATA, lParam); SetWindowLongPtr(hwnd, GWLP_USERDATA, lParam);
} }
else { else {
// get the extra window data and forward the call // get the extra window data and forward the call
LONG data = (LONG)GetWindowLongPtr(hwnd, GWLP_USERDATA); LONG_PTR data = GetWindowLongPtr(hwnd, GWLP_USERDATA);
if (data != 0) { if (data != 0) {
self = reinterpret_cast<MSWindowsServerTaskBarReceiver*>( self = reinterpret_cast<MSWindowsServerTaskBarReceiver*>(data);
reinterpret_cast<void*>(data));
} }
} }