diff options
Diffstat (limited to 'src/modules/utils/utils.cpp')
-rw-r--r-- | src/modules/utils/utils.cpp | 10 |
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;
|