mirror of
https://github.com/debauchee/barrier.git
synced 2026-02-09 13:15:33 +08:00
#4978 Fixed bad casting on 64bit Windows
This commit is contained in:
committed by
Jerry (Xinyu Hou)
parent
04184b51ea
commit
e1432f670c
@@ -360,10 +360,9 @@ MSWindowsPortableTaskBarReceiver::staticDlgProc(HWND hwnd,
|
||||
}
|
||||
else {
|
||||
// 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) {
|
||||
self = reinterpret_cast<MSWindowsPortableTaskBarReceiver*>(
|
||||
reinterpret_cast<void*>(data));
|
||||
self = reinterpret_cast<MSWindowsPortableTaskBarReceiver*>(data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -368,16 +368,14 @@ MSWindowsServerTaskBarReceiver::staticDlgProc(HWND hwnd,
|
||||
// and put it in the extra window data then forward the call.
|
||||
MSWindowsServerTaskBarReceiver* self = NULL;
|
||||
if (msg == WM_INITDIALOG) {
|
||||
self = reinterpret_cast<MSWindowsServerTaskBarReceiver*>(
|
||||
reinterpret_cast<void*>(lParam));
|
||||
self = reinterpret_cast<MSWindowsServerTaskBarReceiver*>(lParam);
|
||||
SetWindowLongPtr(hwnd, GWLP_USERDATA, lParam);
|
||||
}
|
||||
else {
|
||||
// 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) {
|
||||
self = reinterpret_cast<MSWindowsServerTaskBarReceiver*>(
|
||||
reinterpret_cast<void*>(data));
|
||||
self = reinterpret_cast<MSWindowsServerTaskBarReceiver*>(data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user