From 0d1f1efe01eea70634b4c22094c4a64b70806938 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 15 Mar 2020 20:06:31 +0300 Subject: minus another static buffer --- plugins/New_GPG/src/main.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'plugins/New_GPG/src') diff --git a/plugins/New_GPG/src/main.cpp b/plugins/New_GPG/src/main.cpp index bb0af2af05..ad96b2bda9 100755 --- a/plugins/New_GPG/src/main.cpp +++ b/plugins/New_GPG/src/main.cpp @@ -62,12 +62,12 @@ void InitCheck() boost::filesystem::remove(test_path); } if (!home_dir_access || !temp_access || !globals.gpg_valid) { - wchar_t buf[4096]; - wcsncpy(buf, globals.gpg_valid ? TranslateT("GPG binary is set and valid (this is good).\n") : TranslateT("GPG binary unset or invalid (plugin will not work).\n"), _countof(buf)); - mir_wstrncat(buf, home_dir_access ? TranslateT("Home dir write access granted (this is good).\n") : TranslateT("Home dir has no write access (plugin most probably will not work).\n"), _countof(buf) - mir_wstrlen(buf)); - mir_wstrncat(buf, temp_access ? TranslateT("Temp dir write access granted (this is good).\n") : TranslateT("Temp dir has no write access (plugin should work, but may have some problems, file transfers will not work)."), _countof(buf) - mir_wstrlen(buf)); + CMStringW buf; + buf.Append(globals.gpg_valid ? TranslateT("GPG binary is set and valid (this is good).\n") : TranslateT("GPG binary unset or invalid (plugin will not work).\n")); + buf.Append(home_dir_access ? TranslateT("Home dir write access granted (this is good).\n") : TranslateT("Home dir has no write access (plugin most probably will not work).\n")); + buf.Append(temp_access ? TranslateT("Temp dir write access granted (this is good).\n") : TranslateT("Temp dir has no write access (plugin should work, but may have some problems, file transfers will not work).")); if (!globals.gpg_valid) - mir_wstrncat(buf, TranslateT("\nGPG will be disabled until you solve these problems"), _countof(buf) - mir_wstrlen(buf)); + buf.Append(TranslateT("\nGPG will be disabled until you solve these problems")); MessageBox(nullptr, buf, TranslateT("GPG plugin problems"), MB_OK); } if (!globals.gpg_valid) -- cgit v1.2.3