From 37f0dfdfac4dc0af578769b02e29efb9926415bb Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 6 Apr 2013 21:07:53 +0000 Subject: postfix to the standard functions patch by Mataes git-svn-id: http://svn.miranda-ng.org/main/trunk@4351 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/IEView/src/ScriverHTMLBuilder.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'plugins/IEView/src/ScriverHTMLBuilder.cpp') diff --git a/plugins/IEView/src/ScriverHTMLBuilder.cpp b/plugins/IEView/src/ScriverHTMLBuilder.cpp index 6c11c4be51..a3752d753c 100644 --- a/plugins/IEView/src/ScriverHTMLBuilder.cpp +++ b/plugins/IEView/src/ScriverHTMLBuilder.cpp @@ -171,9 +171,7 @@ char *ScriverHTMLBuilder::timestampToString(DWORD dwFlags, time_t check, int mod //_tcsncat(szResult, str, 500); strncat(szResult, str, 500); } - char *tmp = mir_utf8encode(szResult); - lstrcpynA(szResult, tmp, 500); - mir_free(tmp); + lstrcpynA(szResult, mir_ptr(mir_utf8encode(szResult)), 500); return szResult; } @@ -302,7 +300,7 @@ void ScriverHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event (((eventData->time < startedTime) == (getLastEventTime() < startedTime)) || !(eventData->dwFlags & IEEDF_READ))) { isGroupBreak = FALSE; } - char *szName = NULL, *szText = NULL; + mir_ptr szName, szText; if (eventData->dwFlags & IEEDF_UNICODE_NICK) szName = encodeUTF8(event->hContact, szRealProto, eventData->pszNickW, ENF_NAMESMILEYS, true); else @@ -371,8 +369,7 @@ void ScriverHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event if (eventData->iType == IEED_EVENT_MESSAGE) { if (showColon) Utils::appendText(&output, &outputSize, " %s", - isSent ? "nameOut" : "nameIn", - szName); + isSent ? "nameOut" : "nameIn", szName); else Utils::appendText(&output, &outputSize, "%s", isSent ? "nameOut" : "nameIn", szName); @@ -421,8 +418,6 @@ void ScriverHTMLBuilder::appendEventNonTemplate(IEView *view, IEVIEWEVENT *event Utils::appendText(&output, &outputSize, "\n"); setLastEventType(MAKELONG(eventData->dwFlags, eventData->iType)); setLastEventTime(eventData->time); - if (szName!=NULL) delete szName; - if (szText!=NULL) delete szText; } if (output != NULL) { view->write(output); -- cgit v1.2.3