From 94fb75230352ce8729e9b0ace42e81c6d494a6fd Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Thu, 23 Aug 2018 23:52:02 +0300 Subject: MirCmd: crash fix --- plugins/MimCmd/src/MimCmd.cpp | 0 plugins/MimCmd/src/commands.cpp | 7 +++++-- 2 files changed, 5 insertions(+), 2 deletions(-) mode change 100644 => 100755 plugins/MimCmd/src/MimCmd.cpp mode change 100644 => 100755 plugins/MimCmd/src/commands.cpp (limited to 'plugins') diff --git a/plugins/MimCmd/src/MimCmd.cpp b/plugins/MimCmd/src/MimCmd.cpp old mode 100644 new mode 100755 diff --git a/plugins/MimCmd/src/commands.cpp b/plugins/MimCmd/src/commands.cpp old mode 100644 new mode 100755 index 10a437e383..a336784e76 --- 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; -- cgit v1.2.3