diff options
author | George Hazan <george.hazan@gmail.com> | 2014-01-10 23:33:35 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-01-10 23:33:35 +0000 |
commit | 18448e7014c32235db05465f1bf76b30f9954029 (patch) | |
tree | ebf78a23f27c92eeff9ad3d185258ea8fe029e97 /src | |
parent | 452fb59c22573ddf7939bea02b5e58f4f2e3916c (diff) |
GCDEST::pszModule and GCDEST::ptszID must be constant
git-svn-id: http://svn.miranda-ng.org/main/trunk@7586 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src')
-rw-r--r-- | src/core/stdchat/src/services.cpp | 4 | ||||
-rw-r--r-- | src/core/stdchat/src/tools.cpp | 2 | ||||
-rw-r--r-- | src/core/stdchat/src/window.cpp | 8 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/core/stdchat/src/services.cpp b/src/core/stdchat/src/services.cpp index 0e146a2903..e4b6ee34ae 100644 --- a/src/core/stdchat/src/services.cpp +++ b/src/core/stdchat/src/services.cpp @@ -487,8 +487,6 @@ static INT_PTR Service_AddEvent(WPARAM wParam, LPARAM lParam) {
GCEVENT *gce = (GCEVENT*)lParam;
GCDEST *gcd = NULL;
- TCHAR* pWnd = NULL;
- char* pMod = NULL;
BOOL bIsHighlighted = FALSE;
BOOL bRemoveFlag = FALSE;
@@ -581,6 +579,8 @@ static INT_PTR Service_AddEvent(WPARAM wParam, LPARAM lParam) }
// Decide which window (log) should have the event
+ LPCTSTR pWnd = NULL;
+ LPCSTR pMod = NULL;
if (gcd->ptszID) {
pWnd = gcd->ptszID;
pMod = gcd->pszModule;
diff --git a/src/core/stdchat/src/tools.cpp b/src/core/stdchat/src/tools.cpp index 3ccd7f710c..55fa601ba3 100644 --- a/src/core/stdchat/src/tools.cpp +++ b/src/core/stdchat/src/tools.cpp @@ -800,7 +800,7 @@ BOOL DoEventHook(const TCHAR *pszID, const char* pszModule, int iType, const TCH if (si == NULL)
return FALSE;
- GCDEST gcd = { (char*)pszModule, (LPTSTR)pszID, iType };
+ GCDEST gcd = { (char*)pszModule, pszID, iType };
GCHOOK gch = { 0 };
gch.ptszUID = (LPTSTR)pszUID;
gch.ptszText = (LPTSTR)pszText;
diff --git a/src/core/stdchat/src/window.cpp b/src/core/stdchat/src/window.cpp index f59dc49f2e..2cd58b222e 100644 --- a/src/core/stdchat/src/window.cpp +++ b/src/core/stdchat/src/window.cpp @@ -2017,12 +2017,12 @@ LABEL_SHOWWINDOW: GCHOOK *gch = (GCHOOK *)lParam;
NotifyEventHooks(hSendEvent, 0, (WPARAM)gch);
if (gch->pDest) {
- mir_free(gch->pDest->ptszID);
- mir_free(gch->pDest->pszModule);
+ mir_free((void*)gch->pDest->ptszID);
+ mir_free((void*)gch->pDest->pszModule);
mir_free(gch->pDest);
}
- mir_free(gch->ptszText);
- mir_free(gch->ptszUID);
+ mir_free((void*)gch->ptszText);
+ mir_free((void*)gch->ptszUID);
mir_free(gch);
}
break;
|