mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Add a few more safety checks for SendMessage().
Broadcasting is bad.
This commit is contained in:
1 parent
ec34c31416
commit
f62eb4848d
2 files changed
+4
-3
No files matched your search
@@ -641,7 +641,7 @@ BOOL CDisasm::DlgProc(UINT message, WPARAM wParam, LPARAM lParam)
|
||||
|
||||
case WM_DEB_SETSTATUSBARTEXT:
|
||||
if (!keepStatusBarText)
|
||||
SendMessage(statusBarWnd,WM_SETTEXT,0,(LPARAM)ConvertUTF8ToWString((const char *)lParam).c_str());
|
||||
SetWindowText(statusBarWnd, ConvertUTF8ToWString((const char *)lParam).c_str());
|
||||
break;
|
||||
case WM_DEB_GOTOHEXEDIT:
|
||||
{
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
RECT CMemoryDlg::slRect;
|
||||
|
||||
FAR WNDPROC DefAddressEditProc;
|
||||
HWND AddressEditParentHwnd;
|
||||
HWND AddressEditParentHwnd = 0;
|
||||
|
||||
LRESULT CALLBACK AddressEditProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
@@ -26,7 +26,8 @@ LRESULT CALLBACK AddressEditProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM
|
||||
case WM_KEYDOWN:
|
||||
if( wParam == VK_RETURN )
|
||||
{
|
||||
SendMessage(AddressEditParentHwnd,WM_DEB_GOTOADDRESSEDIT,0,0);
|
||||
if (AddressEditParentHwnd != 0)
|
||||
SendMessage(AddressEditParentHwnd,WM_DEB_GOTOADDRESSEDIT,0,0);
|
||||
return 0;
|
||||
}
|
||||
case WM_KEYUP:
|
||||
|
||||
Reference in new issue
Block a user