diff options
author | George Hazan <ghazan@miranda.im> | 2020-03-15 20:06:31 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-03-15 20:06:31 +0300 |
commit | 0d1f1efe01eea70634b4c22094c4a64b70806938 (patch) | |
tree | c85a323f71ccaeeafa5e910fef099a1be72ec43f /plugins/New_GPG/src/main.cpp | |
parent | 4ccc56ee5f781fef7ef896173d8e220794977527 (diff) |
minus another static buffer
Diffstat (limited to 'plugins/New_GPG/src/main.cpp')
-rwxr-xr-x | plugins/New_GPG/src/main.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
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) |