summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss@sss.chaoslab.ru>2018-08-23 23:52:02 +0300
committerGluzskiy Alexandr <sss@sss.chaoslab.ru>2018-08-23 23:54:13 +0300
commit94fb75230352ce8729e9b0ace42e81c6d494a6fd (patch)
tree472b25da646db737193dd7892c04b84007e630ea /plugins
parent42de6a93d3cdb10eb775113b8a6f3a69c78c82c4 (diff)
MirCmd: crash fix
Diffstat (limited to 'plugins')
-rwxr-xr-x[-rw-r--r--]plugins/MimCmd/src/MimCmd.cpp0
-rwxr-xr-x[-rw-r--r--]plugins/MimCmd/src/commands.cpp7
2 files changed, 5 insertions, 2 deletions
diff --git a/plugins/MimCmd/src/MimCmd.cpp b/plugins/MimCmd/src/MimCmd.cpp
index 5b7bde1b96..5b7bde1b96 100644..100755
--- a/plugins/MimCmd/src/MimCmd.cpp
+++ b/plugins/MimCmd/src/MimCmd.cpp
diff --git a/plugins/MimCmd/src/commands.cpp b/plugins/MimCmd/src/commands.cpp
index 10a437e383..a336784e76 100644..100755
--- a/plugins/MimCmd/src/commands.cpp
+++ b/plugins/MimCmd/src/commands.cpp
@@ -51,9 +51,12 @@ int ConnectToMiranda()
SetEnvironmentVariable(L"PATH", ptszVal);
delete[] ptszVal;
- wchar_t pluginPath[1024];
+ wchar_t pluginPath[1024] = {0};
GetMirandaFolder(pluginPath, _countof(pluginPath));
- mir_wstrcat(pluginPath, L"\\plugins\\cmdline.dll");
+ if(pluginPath[0])
+ mir_wstrcat(pluginPath, L"\\plugins\\cmdline.dll");
+ else
+ mir_wstrcat(pluginPath, L"plugins\\cmdline.dll");
ListCommands = nullptr;