diff options
author | Rozhuk Ivan <rozhuk.im@gmail.com> | 2014-12-09 00:59:27 +0000 |
---|---|---|
committer | Rozhuk Ivan <rozhuk.im@gmail.com> | 2014-12-09 00:59:27 +0000 |
commit | 36472b00443e23acf28b0dd26ddc2c2e6216d909 (patch) | |
tree | a526bbc6d309e05f1728b772620c9272f9ab8c4a /plugins/BasicHistory/src/ExportManager.cpp | |
parent | 163ce5127e5c8244bccbdae72107ad101f70575f (diff) |
code cleanup over mir_sntprintf + small bug fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@11295 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/BasicHistory/src/ExportManager.cpp')
-rw-r--r-- | plugins/BasicHistory/src/ExportManager.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/BasicHistory/src/ExportManager.cpp b/plugins/BasicHistory/src/ExportManager.cpp index 853d2d0229..734ef0971d 100644 --- a/plugins/BasicHistory/src/ExportManager.cpp +++ b/plugins/BasicHistory/src/ExportManager.cpp @@ -38,11 +38,12 @@ std::wstring GetFile(const TCHAR* ext, HWND hwnd, bool open) TCHAR filter[512];
std::locale loc;
TCHAR extUpper[32];
+
_tcscpy_s(extUpper, ext);
extUpper[0] = std::toupper(ext[0], loc);
mir_sntprintf(filter, SIZEOF(filter), TranslateT("%s Files (*.%s)"), extUpper, ext);
size_t len = _tcslen(filter) + 1;
- mir_sntprintf(filter + len, 512 - len, _T("*.%s"), ext);
+ mir_sntprintf(filter + len, SIZEOF(filter) - len, _T("*.%s"), ext);
len += _tcslen(filter + len);
filter[++len] = 0;
TCHAR stzFilePath[1024];
|