summaryrefslogtreecommitdiff
path: root/plugins/MyDetails
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/MyDetails')
-rw-r--r--plugins/MyDetails/src/data.cpp14
-rw-r--r--plugins/MyDetails/src/services.cpp10
2 files changed, 12 insertions, 12 deletions
diff --git a/plugins/MyDetails/src/data.cpp b/plugins/MyDetails/src/data.cpp
index 55b8a564d9..85eba40907 100644
--- a/plugins/MyDetails/src/data.cpp
+++ b/plugins/MyDetails/src/data.cpp
@@ -54,8 +54,8 @@ void DeInitProtocolData()
Protocol::Protocol(const char *aName, const TCHAR *descr)
{
- lstrcpynA(name, aName, SIZEOF(name));
- lstrcpyn(description, descr, SIZEOF(description));
+ mir_strncpy(name, aName, SIZEOF(name));
+ mir_tstrncpy(description, descr, SIZEOF(description));
data_changed = true;
@@ -88,7 +88,7 @@ void Protocol::lcopystr(TCHAR *dest, TCHAR *src, size_t maxlen)
{
if (lstrcmp(dest, src) != 0) {
data_changed = true;
- lstrcpyn(dest, src, (DWORD)maxlen);
+ mir_tstrncpy(dest, src, (DWORD)maxlen);
}
}
@@ -485,7 +485,7 @@ void ProtocolArray::SetNicks(const TCHAR *nick)
if (nick == NULL || nick[0] == '\0')
return;
- lstrcpyn(default_nick, nick, SIZEOF(default_nick));
+ mir_tstrncpy(default_nick, nick, SIZEOF(default_nick));
db_set_ts(0, MODULE_NAME, SETTING_DEFAULT_NICK, nick);
@@ -550,7 +550,7 @@ TCHAR *ProtocolArray::GetDefaultStatusMsg(int status)
TCHAR *tmp = (TCHAR *)CallService(MS_AWAYMSG_GETSTATUSMSGT, (WPARAM)status, 0);
if (tmp != NULL) {
- lstrcpyn(default_status_message, tmp, SIZEOF(default_status_message));
+ mir_tstrncpy(default_status_message, tmp, SIZEOF(default_status_message));
mir_free(tmp);
}
@@ -590,7 +590,7 @@ static char *StatusModeToDbSetting(int status, const char *suffix)
case ID_STATUS_IDLE: prefix = "Idl"; break;
default: return NULL;
}
- lstrcpyA(str, prefix);
- lstrcatA(str, suffix);
+ mir_strcpy(str, prefix);
+ mir_strcat(str, suffix);
return str;
}
diff --git a/plugins/MyDetails/src/services.cpp b/plugins/MyDetails/src/services.cpp
index 364946146a..c613b35763 100644
--- a/plugins/MyDetails/src/services.cpp
+++ b/plugins/MyDetails/src/services.cpp
@@ -60,7 +60,7 @@ static INT_PTR CALLBACK DlgProcSetNickname(HWND hwndDlg, UINT msg, WPARAM wParam
if (foundDefNick)
if (_tcsicmp(protocols->default_nick, nick) != 0)
- lstrcpy(protocols->default_nick, nick);
+ mir_tstrcpy(protocols->default_nick, nick);
}
SetDlgItemText(hwndDlg, IDC_NICKNAME, protocols->default_nick);
@@ -189,7 +189,7 @@ INT_PTR PluginCommand_GetMyNickname(WPARAM wParam, LPARAM lParam)
char *proto = (char *)wParam;
if (proto == NULL) {
if (protocols->default_nick != NULL)
- lstrcpyn(ret, protocols->default_nick, MS_MYDETAILS_GETMYNICKNAME_BUFFER_SIZE);
+ mir_tstrncpy(ret, protocols->default_nick, MS_MYDETAILS_GETMYNICKNAME_BUFFER_SIZE);
else
ret[0] = '\0';
@@ -198,7 +198,7 @@ INT_PTR PluginCommand_GetMyNickname(WPARAM wParam, LPARAM lParam)
else {
Protocol *protocol = protocols->Get(proto);
if (protocol != NULL) {
- lstrcpyn(ret, protocol->nickname, MS_MYDETAILS_GETMYNICKNAME_BUFFER_SIZE);
+ mir_tstrncpy(ret, protocol->nickname, MS_MYDETAILS_GETMYNICKNAME_BUFFER_SIZE);
return 0;
}
@@ -268,7 +268,7 @@ INT_PTR PluginCommand_GetMyAvatar(WPARAM wParam, LPARAM lParam)
if (proto == NULL) {
if (protocols->default_avatar_file != NULL)
- lstrcpyn(ret, protocols->default_avatar_file, MS_MYDETAILS_GETMYAVATAR_BUFFER_SIZE);
+ mir_tstrncpy(ret, protocols->default_avatar_file, MS_MYDETAILS_GETMYAVATAR_BUFFER_SIZE);
else
ret[0] = '\0';
@@ -283,7 +283,7 @@ INT_PTR PluginCommand_GetMyAvatar(WPARAM wParam, LPARAM lParam)
protocols->Get(i)->GetAvatar();
if (protocols->Get(i)->avatar_file != NULL)
- lstrcpyn(ret, protocols->Get(i)->avatar_file, MS_MYDETAILS_GETMYAVATAR_BUFFER_SIZE);
+ mir_tstrncpy(ret, protocols->Get(i)->avatar_file, MS_MYDETAILS_GETMYAVATAR_BUFFER_SIZE);
else
ret[0] = '\0';