diff options
author | Vlad Mironov <mironych@googlemail.com> | 2012-06-30 15:24:11 +0000 |
---|---|---|
committer | Vlad Mironov <mironych@googlemail.com> | 2012-06-30 15:24:11 +0000 |
commit | 008fe34954b0bda8fd3487a9658c14581ecd813a (patch) | |
tree | f546ed4196e4a09311bf19878ff6e7d1af772d4c /plugins/Variables/parse_miranda.cpp | |
parent | 14f435dc730cf2b242cae1cc2a2f4d4c2a65162e (diff) |
Наводим порядок.
git-svn-id: http://svn.miranda-ng.org/main/trunk@695 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Variables/parse_miranda.cpp')
-rw-r--r-- | plugins/Variables/parse_miranda.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/Variables/parse_miranda.cpp b/plugins/Variables/parse_miranda.cpp index 7a4e26567e..5480a1805b 100644 --- a/plugins/Variables/parse_miranda.cpp +++ b/plugins/Variables/parse_miranda.cpp @@ -561,14 +561,16 @@ static TCHAR *parseSpecialContact(ARGUMENTSINFO *ai) if (szUniqueID == NULL) {
szProto = PROTOID_HANDLE;
- szUniqueID = itot((int)ai->fi->hContact);
+ //szUniqueID = itot((INT_PTR)ai->fi->hContact);
+ szUniqueID = (TCHAR*)mir_alloc(32);
+ _stprintf(szUniqueID, _T("%p"), ai->fi->hContact);
if ( szProto == NULL || szUniqueID == NULL )
return NULL;
}
res = ( TCHAR* )malloc((strlen(szProto) + _tcslen(szUniqueID) + 4)*sizeof(TCHAR));
if (res == NULL) {
- free(szUniqueID);
+ mir_free(szUniqueID);
return NULL;
}
@@ -578,7 +580,7 @@ static TCHAR *parseSpecialContact(ARGUMENTSINFO *ai) if ( tszProto != NULL && szUniqueID != NULL ) {
wsprintf(res, _T("<%s:%s>"), tszProto, szUniqueID);
- free(szUniqueID);
+ mir_free(szUniqueID);
free(tszProto);
}
|