diff options
author | George Hazan <ghazan@miranda.im> | 2018-02-16 22:07:43 +0200 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-02-16 22:08:26 +0200 |
commit | 8d127430d057891fbd3ac5989d32090715d7923a (patch) | |
tree | 2c02b3401ca7a583302730161c3e11ec9607c1f4 /plugins/CmdLine/src/services.cpp | |
parent | 9cde0c92420f4811a646964c1304f7c55f8a50a5 (diff) |
fixes #1143 (CmdLine Plugin error when using Diacritics in message)
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 +}
|