diff options
Diffstat (limited to 'plugins/AvatarHistory')
-rw-r--r-- | plugins/AvatarHistory/src/AvatarDlg.cpp | 13 | ||||
-rw-r--r-- | plugins/AvatarHistory/src/utils.cpp | 2 |
2 files changed, 8 insertions, 7 deletions
diff --git a/plugins/AvatarHistory/src/AvatarDlg.cpp b/plugins/AvatarHistory/src/AvatarDlg.cpp index 0102758453..491d3d34be 100644 --- a/plugins/AvatarHistory/src/AvatarDlg.cpp +++ b/plugins/AvatarHistory/src/AvatarDlg.cpp @@ -139,8 +139,9 @@ static INT_PTR CALLBACK AvatarDlgProc(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM l if (displayName)
{
TCHAR title[MAX_PATH];
- mir_sntprintf(title,MAX_PATH,TranslateT("Avatar History for %s"),displayName);
- SetWindowText(hwnd,title);
+
+ mir_sntprintf(title, SIZEOF(title), TranslateT("Avatar History for %s"), displayName);
+ SetWindowText(hwnd, title);
}
SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR)data->hContact);
@@ -380,7 +381,7 @@ int FillAvatarListFromFiles(HWND list, MCONTACT hContact) WIN32_FIND_DATA finddata;
GetContactFolder(dir, hContact);
- mir_sntprintf(path, MAX_PATH, _T("%s\\*.*"), dir);
+ mir_sntprintf(path, SIZEOF(path), _T("%s\\*.*"), dir);
HANDLE hFind = FindFirstFile(path, &finddata);
if (hFind == INVALID_HANDLE_VALUE)
@@ -390,7 +391,7 @@ int FillAvatarListFromFiles(HWND list, MCONTACT hContact) {
if (finddata.cFileName[0] != '.')
{
- mir_sntprintf(path, MAX_PATH, _T("%s\\%s"), dir, finddata.cFileName);
+ mir_sntprintf(path, SIZEOF(path), _T("%s\\%s"), dir, finddata.cFileName);
max_pos = AddFileToList(path,finddata.cFileName,finddata.cFileName,list);
}
}
@@ -407,7 +408,7 @@ int FillAvatarListFromFolder(HWND list, MCONTACT hContact) WIN32_FIND_DATA finddata;
GetContactFolder(dir, hContact);
- mir_sntprintf(path, MAX_PATH, _T("%s\\*.lnk"), dir);
+ mir_sntprintf(path, SIZEOF(path), _T("%s\\*.lnk"), dir);
HANDLE hFind = FindFirstFile(path, &finddata);
if (hFind == INVALID_HANDLE_VALUE)
@@ -418,7 +419,7 @@ int FillAvatarListFromFolder(HWND list, MCONTACT hContact) if (finddata.cFileName[0] != '.')
{
TCHAR lnk[MAX_PATH];
- mir_sntprintf(lnk, MAX_PATH, _T("%s\\%s"), dir, finddata.cFileName);
+ mir_sntprintf(lnk, SIZEOF(lnk), _T("%s\\%s"), dir, finddata.cFileName);
if (ResolveShortcut(lnk, path))
max_pos = AddFileToList(path,lnk,finddata.cFileName,list);
}
diff --git a/plugins/AvatarHistory/src/utils.cpp b/plugins/AvatarHistory/src/utils.cpp index 4829ea83ed..4f9dc23773 100644 --- a/plugins/AvatarHistory/src/utils.cpp +++ b/plugins/AvatarHistory/src/utils.cpp @@ -151,7 +151,7 @@ TCHAR* GetContactFolder(TCHAR *fn, MCONTACT hContact) #ifdef DBGPOPUPS
TCHAR log[1024];
- mir_sntprintf(log, MAX_REGS(log), _T("Path: %s\nProto: %S\nUIN: %s"), fn, proto, uin);
+ mir_sntprintf(log, SIZEOF(log), _T("Path: %s\nProto: %S\nUIN: %s"), fn, proto, uin);
ShowPopup(hContact, _T("AVH Debug: GetContactFolder"), log);
#endif
|