diff options
author | Alexander Gluzsky <sss123next@list.ru> | 2013-04-04 09:34:04 +0000 |
---|---|---|
committer | Alexander Gluzsky <sss123next@list.ru> | 2013-04-04 09:34:04 +0000 |
commit | 9a58588e9affe4bdc2ce96e10b49a75babbdc24c (patch) | |
tree | c2232d1b718e34223c200fbf87e3c2012744becb | |
parent | 716a7321b7a26a8f6cd6709c36c1e833cd0c2e79 (diff) |
fixed memory allocation/cleaning
fixed ? menu order
git-svn-id: http://svn.miranda-ng.org/main/trunk@4299 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rwxr-xr-x | plugins/New_GPG/src/init.cpp | 4 | ||||
-rwxr-xr-x | plugins/New_GPG/src/messages.cpp | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/plugins/New_GPG/src/init.cpp b/plugins/New_GPG/src/init.cpp index ef28840c60..f40fcec786 100755 --- a/plugins/New_GPG/src/init.cpp +++ b/plugins/New_GPG/src/init.cpp @@ -212,7 +212,7 @@ extern "C" int __declspec(dllexport) Load() ZeroMemory(&mi,sizeof(mi));
mi.cbSize=sizeof(mi);
- mi.position=-0x7FFFFFFe;
+ mi.position=-0x7FFFFFFd;
mi.flags=CMIF_TCHAR;
mi.hIcon=LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
mi.ptszName=LPGENT("Send public key");
@@ -221,7 +221,7 @@ extern "C" int __declspec(dllexport) Load() ZeroMemory(&mi,sizeof(mi));
mi.cbSize=sizeof(mi);
- mi.position=-0x7FFFFFFF;
+ mi.position=-0x7FFFFFFe;
mi.flags=CMIF_TCHAR;
mi.hIcon=LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
mi.ptszName=LPGENT("Export GPG Public keys");
diff --git a/plugins/New_GPG/src/messages.cpp b/plugins/New_GPG/src/messages.cpp index 262aa2abfa..b9c87a5595 100755 --- a/plugins/New_GPG/src/messages.cpp +++ b/plugins/New_GPG/src/messages.cpp @@ -268,7 +268,7 @@ void RecvMsgSvc_func(HANDLE hContact, std::wstring str, char *msg, DWORD flags, str.insert(0, "Received unencrypted message:\n"); if(bDebugLog) debuglog<<std::string(time_str()+": info: Failed to decrypt GPG encrypted message."); - char *tmp = new char [str.length()+1]; + char *tmp = (char*)mir_alloc(sizeof(char)*(str.length()+1)); strcpy(tmp, str.c_str()); HistoryLog(hContact, db_event(msg, timestamp, 0, dbflags)); BYTE enc = DBGetContactSettingByte(hContact, szGPGModuleName, "GPGEncryption", 0); @@ -1144,8 +1144,8 @@ static INT_PTR CALLBACK DlgProcKeyPassword(HWND hwndDlg, UINT msg, WPARAM wParam DBWriteContactSettingTString(NULL, szGPGModuleName, "szKeyPassword", tmp); } if(password) - delete [] password; - password = new TCHAR [_tcslen(tmp)+1]; + mir_free(password); + password = (TCHAR*)mir_alloc(sizeof(TCHAR)*(_tcslen(tmp)+1)); _tcscpy(password, tmp); } mir_free(tmp); |