summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/utils.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-12-13 19:01:54 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-12-13 19:01:54 +0000
commitf55574591e8f66adc24fd62f25b4dc7f299e87a0 (patch)
treeed54a82c8d2ca5be748aa69fcb24e2d0d551fde1 /plugins/TabSRMM/src/utils.cpp
parenteedc182bb90afb9f809aec8ecfce8526ad3ab0e2 (diff)
Utils::FormatTitleBar: wrong function's return type
git-svn-id: http://svn.miranda-ng.org/main/trunk@11374 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM/src/utils.cpp')
-rw-r--r--plugins/TabSRMM/src/utils.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/plugins/TabSRMM/src/utils.cpp b/plugins/TabSRMM/src/utils.cpp
index 24f98cda06..960def80c4 100644
--- a/plugins/TabSRMM/src/utils.cpp
+++ b/plugins/TabSRMM/src/utils.cpp
@@ -261,10 +261,8 @@ ok:
// format the title bar string for IM chat sessions using placeholders.
// the caller must mir_free() the returned string
-const TCHAR* Utils::FormatTitleBar(const TWindowData *dat, const TCHAR *szFormat)
+TCHAR* Utils::FormatTitleBar(const TWindowData *dat, const TCHAR *szFormat)
{
- TCHAR *szResult = 0;
- INT_PTR length = 0;
INT_PTR tempmark = 0;
TCHAR szTemp[512];
@@ -401,14 +399,8 @@ const TCHAR* Utils::FormatTitleBar(const TWindowData *dat, const TCHAR *szFormat
break;
}
}
- length = title.length();
- szResult = (TCHAR*)mir_alloc((length + 2) * sizeof(TCHAR));
- if (szResult) {
- _tcsncpy(szResult, title.c_str(), length);
- szResult[length] = 0;
- }
- return szResult;
+ return mir_tstrndup(title.c_str(), title.length());
}
char* Utils::FilterEventMarkers(char *szText)