diff options
Diffstat (limited to 'plugins/CmdLine/src/services.cpp')
-rw-r--r-- | plugins/CmdLine/src/services.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/CmdLine/src/services.cpp b/plugins/CmdLine/src/services.cpp index 56c768878a..66f1c6d310 100644 --- a/plugins/CmdLine/src/services.cpp +++ b/plugins/CmdLine/src/services.cpp @@ -75,11 +75,11 @@ int StartServer() HANDLE server = mir_forkthread(ServerWorkerThread, nullptr);
if (server)
{
- char path[MIMFOLDER_SIZE];
- GetModuleFileNameA(GetModuleHandle(nullptr), path, sizeof(path));
- char *p = strrchr(path, '\\');
- if (p) { *p = 0; }
- strncpy_s(sdCmdLine->mimFolder, path, _TRUNCATE);
+ wchar_t path[MIMFOLDER_SIZE];
+ GetModuleFileNameW(GetModuleHandle(nullptr), path, _countof(path));
+ wchar_t *p = wcsrchr(path, '\\');
+ if (p) *p = 0;
+ wcsncpy_s(sdCmdLine->mimFolder, path, _TRUNCATE);
sdCmdLine->instances++;
failure = 0;
@@ -96,4 +96,4 @@ extern "C" __declspec(dllexport) void ListCommands(PCommand * commands, int *cou {
*commands = mimCommands;
*count = cMimCommands;
-}
\ No newline at end of file +}
|