From e2c2a1f5a84c6c9b705dc85c6a2dd1f97edd57e4 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 22 May 2015 16:04:17 +0000 Subject: T2Utf - handy replacement for ptrA git-svn-id: http://svn.miranda-ng.org/main/trunk@13758 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Nudge/src/main.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'plugins/Nudge') diff --git a/plugins/Nudge/src/main.cpp b/plugins/Nudge/src/main.cpp index 7859e28be8..b515b3dbff 100644 --- a/plugins/Nudge/src/main.cpp +++ b/plugins/Nudge/src/main.cpp @@ -476,7 +476,7 @@ void Nudge_ShowPopup(CNudgeElement *n, MCONTACT hContact, TCHAR * Message) void Nudge_SentStatus(CNudgeElement *n, MCONTACT hContact) { - char *buff = mir_utf8encodeT(n->senText); + T2Utf buff(n->senText); DBEVENTINFO dbei = { sizeof(dbei) }; dbei.szModule = MODULENAME; @@ -486,12 +486,11 @@ void Nudge_SentStatus(CNudgeElement *n, MCONTACT hContact) dbei.cbBlob = (DWORD)mir_strlen(buff) + 1; dbei.pBlob = (PBYTE)buff; db_event_add(hContact, &dbei); - mir_free(buff); } void Nudge_ShowStatus(CNudgeElement *n, MCONTACT hContact, DWORD timestamp) { - char *buff = mir_utf8encodeT(n->recText); + T2Utf buff(n->recText); DBEVENTINFO dbei = { sizeof(dbei) }; dbei.szModule = MODULENAME; @@ -501,7 +500,6 @@ void Nudge_ShowStatus(CNudgeElement *n, MCONTACT hContact, DWORD timestamp) dbei.cbBlob = (DWORD)mir_strlen(buff) + 1; dbei.pBlob = (PBYTE)buff; db_event_add(hContact, &dbei); - mir_free(buff); } void Nudge_AddAccount(PROTOACCOUNT *proto) -- cgit v1.2.3