diff options
author | Rozhuk Ivan <rozhuk.im@gmail.com> | 2014-12-02 03:47:27 +0000 |
---|---|---|
committer | Rozhuk Ivan <rozhuk.im@gmail.com> | 2014-12-02 03:47:27 +0000 |
commit | 6e2b6b31bae6d69bff5271451e73eb08637b8118 (patch) | |
tree | ca636f1497e4cc6980736d56a7ff61e3a6f88079 /plugins/BossKeyPlus/src | |
parent | d83beb598f0944dcb944524b1d27525dc320cf18 (diff) |
mir_sntprintf(..., _T("%s"), ...) -> _tcsncpy_s(..., ..., _TRUNCATE)
fix some x64 ptr truncations
git-svn-id: http://svn.miranda-ng.org/main/trunk@11211 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/BossKeyPlus/src')
-rw-r--r-- | plugins/BossKeyPlus/src/BossKey.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/plugins/BossKeyPlus/src/BossKey.cpp b/plugins/BossKeyPlus/src/BossKey.cpp index 309713140c..572a1c364c 100644 --- a/plugins/BossKeyPlus/src/BossKey.cpp +++ b/plugins/BossKeyPlus/src/BossKey.cpp @@ -264,13 +264,11 @@ static void CreateTrayIcon(bool create) {
NOTIFYICONDATA nim;
DBVARIANT dbVar;
- if (!db_get_ts(NULL,MOD_NAME,"ToolTipText",&dbVar))
- {
- mir_sntprintf(nim.szTip, 64, _T("%s"), dbVar.ptszVal);
+ if (!db_get_ts(NULL,MOD_NAME,"ToolTipText",&dbVar)) {
+ _tcsncpy_s(nim.szTip, dbVar.ptszVal, _TRUNCATE);
db_free(&dbVar);
- }
- else
- mir_tstrcpy(nim.szTip, _T("Miranda NG"));
+ } else
+ _tcsncpy_s(nim.szTip, _T("Miranda NG"), _TRUNCATE);
nim.cbSize = sizeof(nim);
nim.hWnd = g_hListenWindow;
|