summaryrefslogtreecommitdiff
path: root/plugins/AvatarHistory/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/AvatarHistory/src')
-rw-r--r--plugins/AvatarHistory/src/AvatarDlg.cpp2
-rw-r--r--plugins/AvatarHistory/src/AvatarHistory.cpp6
-rw-r--r--plugins/AvatarHistory/src/popup.cpp6
-rw-r--r--plugins/AvatarHistory/src/utils.cpp6
4 files changed, 10 insertions, 10 deletions
diff --git a/plugins/AvatarHistory/src/AvatarDlg.cpp b/plugins/AvatarHistory/src/AvatarDlg.cpp
index 2c4f63afd4..997df7b244 100644
--- a/plugins/AvatarHistory/src/AvatarDlg.cpp
+++ b/plugins/AvatarHistory/src/AvatarDlg.cpp
@@ -553,7 +553,7 @@ int ShowSaveDialog(HWND hwnd, TCHAR* fn, MCONTACT hContact)
ofn.lpstrFilter = filter;
ofn.nFilterIndex = 1;
- lstrcpyn(file, _tcsrchr(fn, '\\')+1, sizeof(file));
+ mir_tstrncpy(file, _tcsrchr(fn, '\\')+1, sizeof(file));
ofn.lpstrFile = file;
TCHAR *displayName = (TCHAR*) CallService(MS_CLIST_GETCONTACTDISPLAYNAME,hContact,GCDNF_TCHAR);
diff --git a/plugins/AvatarHistory/src/AvatarHistory.cpp b/plugins/AvatarHistory/src/AvatarHistory.cpp
index 77a60eead3..cd3489212b 100644
--- a/plugins/AvatarHistory/src/AvatarHistory.cpp
+++ b/plugins/AvatarHistory/src/AvatarHistory.cpp
@@ -75,7 +75,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
static INT_PTR GetCachedAvatar(WPARAM wParam, LPARAM lParam)
{
TCHAR hash[128];
- lstrcpyn(hash, (TCHAR *) lParam, sizeof(hash));
+ mir_tstrncpy(hash, (TCHAR *) lParam, sizeof(hash));
ConvertToFilename(hash, sizeof(hash));
return (INT_PTR) GetCachedAvatar((char *) wParam, hash);
}
@@ -169,13 +169,13 @@ static int AvatarChanged(WPARAM hContact, LPARAM lParam)
else {
// See if we already have the avatar
TCHAR hash[128];
- lstrcpyn(hash, avatar->hash, sizeof(hash));
+ mir_tstrncpy(hash, avatar->hash, sizeof(hash));
ConvertToFilename(hash, sizeof(hash));
TCHAR *file = GetCachedAvatar(proto, hash);
if (file != NULL) {
- lstrcpyn(history_filename, file, SIZEOF(history_filename));
+ mir_tstrncpy(history_filename, file, SIZEOF(history_filename));
mir_free(file);
}
else {
diff --git a/plugins/AvatarHistory/src/popup.cpp b/plugins/AvatarHistory/src/popup.cpp
index 42e2a4c87f..55f3a3ffd2 100644
--- a/plugins/AvatarHistory/src/popup.cpp
+++ b/plugins/AvatarHistory/src/popup.cpp
@@ -105,13 +105,13 @@ void ShowPopupEx(MCONTACT hContact, const TCHAR *title, const TCHAR *description
((PopupDataType*)ppd.PluginData)->hIcon = ppd.lchIcon;
if (title != NULL)
- lstrcpyn(ppd.lptzContactName, title, SIZEOF(ppd.lptzContactName));
+ mir_tstrncpy(ppd.lptzContactName, title, SIZEOF(ppd.lptzContactName));
else if (hContact != NULL)
- lstrcpyn(ppd.lptzContactName, (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR),
+ mir_tstrncpy(ppd.lptzContactName, (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR),
SIZEOF(ppd.lptzContactName));
if (description != NULL)
- lstrcpyn(ppd.lptzText, description, SIZEOF(ppd.lptzText));
+ mir_tstrncpy(ppd.lptzText, description, SIZEOF(ppd.lptzText));
if (type == POPUP_TYPE_NORMAL || type == POPUP_TYPE_TEST)
{
diff --git a/plugins/AvatarHistory/src/utils.cpp b/plugins/AvatarHistory/src/utils.cpp
index 57e30f163a..2c18e2edea 100644
--- a/plugins/AvatarHistory/src/utils.cpp
+++ b/plugins/AvatarHistory/src/utils.cpp
@@ -86,7 +86,7 @@ int GetUIDFromHContact(MCONTACT contact, TCHAR* uinout, int uinout_len)
cinfo.dwFlag = CNF_UNIQUEID | CNF_TCHAR;
if (CallService(MS_CONTACT_GETCONTACTINFO, 0, (LPARAM)&cinfo) == 0) {
if (cinfo.type == CNFT_ASCIIZ) {
- lstrcpyn(uinout, cinfo.pszVal, uinout_len);
+ mir_tstrncpy(uinout, cinfo.pszVal, uinout_len);
// It is up to us to free the string
// The catch? We need to use Miranda's free(), not our CRT's :)
mir_free(cinfo.pszVal);
@@ -101,7 +101,7 @@ int GetUIDFromHContact(MCONTACT contact, TCHAR* uinout, int uinout_len)
else found = false;
if (!found)
- lstrcpyn(uinout, TranslateT("Unknown UIN"), uinout_len);
+ mir_tstrncpy(uinout, TranslateT("Unknown UIN"), uinout_len);
return 0;
}
@@ -217,7 +217,7 @@ TCHAR * GetCachedAvatar(char *proto, TCHAR *hash)
do
{
- size_t len = lstrlen(finddata.cFileName);
+ size_t len = mir_tstrlen(finddata.cFileName);
if (len > 4
&& (!lstrcmpi(&finddata.cFileName[len-4], _T(".png"))
|| !lstrcmpi(&finddata.cFileName[len-4], _T(".bmp"))