summaryrefslogtreecommitdiff
path: root/src/modules/utils/utils.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-02-28 17:02:58 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-02-28 17:02:58 +0000
commitea922a1ddd0526d37c6a299ab6260729612a8dfa (patch)
tree56bc15af2b2b173b4368ef3c1a6a065267a23ccf /src/modules/utils/utils.cpp
parent7b44e3c9879ed7cb1ab3f64b829e0c0b09c6ffae (diff)
new template, VARST, to hold the result of calling Utils_ReplaceVarsT()
git-svn-id: http://svn.miranda-ng.org/main/trunk@3806 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/utils/utils.cpp')
-rw-r--r--src/modules/utils/utils.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/modules/utils/utils.cpp b/src/modules/utils/utils.cpp
index 18d5e88973..8c577679c5 100644
--- a/src/modules/utils/utils.cpp
+++ b/src/modules/utils/utils.cpp
@@ -429,11 +429,11 @@ static INT_PTR RestartMiranda(WPARAM wParam, LPARAM)
si.cb = sizeof(si);
GetModuleFileName(NULL, mirandaPath, SIZEOF(mirandaPath));
if (wParam) {
- TCHAR *profilename = Utils_ReplaceVarsT(_T("%miranda_profilename%"));
- mir_sntprintf(cmdLine, SIZEOF(cmdLine), _T("\"%s\" /restart:%d /profile=%s"), mirandaPath, GetCurrentProcessId(), profilename);
- mir_free(profilename);
- } else
- mir_sntprintf(cmdLine, SIZEOF(cmdLine), _T("\"%s\" /restart:%d"), mirandaPath, GetCurrentProcessId());
+ VARST profilename( _T("%miranda_profilename%"));
+ mir_sntprintf(cmdLine, SIZEOF(cmdLine), _T("\"%s\" /restart:%d /profile=%s"), mirandaPath, GetCurrentProcessId(), (TCHAR*)profilename);
+ }
+ else mir_sntprintf(cmdLine, SIZEOF(cmdLine), _T("\"%s\" /restart:%d"), mirandaPath, GetCurrentProcessId());
+
CallService("CloseAction", 0, 0);
CreateProcess(mirandaPath, cmdLine, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
return 0;