diff options
Diffstat (limited to 'plugins/AVS/src')
-rw-r--r-- | plugins/AVS/src/acc.cpp | 4 | ||||
-rw-r--r-- | plugins/AVS/src/options.cpp | 16 | ||||
-rw-r--r-- | plugins/AVS/src/services.cpp | 4 | ||||
-rw-r--r-- | plugins/AVS/src/utils.cpp | 2 |
4 files changed, 13 insertions, 13 deletions
diff --git a/plugins/AVS/src/acc.cpp b/plugins/AVS/src/acc.cpp index 72d9c3b3b6..5930bd8dfb 100644 --- a/plugins/AVS/src/acc.cpp +++ b/plugins/AVS/src/acc.cpp @@ -425,7 +425,7 @@ static LRESULT CALLBACK ACCWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP if (lParam == NULL)
data->proto[0] = '\0';
else
- lstrcpynA(data->proto, GetContactProto(data->hContact), sizeof(data->proto));
+ mir_strncpy(data->proto, GetContactProto(data->hContact), sizeof(data->proto));
StartAnimation(hwnd, data);
@@ -473,7 +473,7 @@ static LRESULT CALLBACK ACCWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP return TRUE;
case AVATAR_SETNOAVATARTEXT:
- lstrcpyn(data->noAvatarText, TranslateTS((TCHAR*)lParam), SIZEOF(data->noAvatarText));
+ mir_tstrncpy(data->noAvatarText, TranslateTS((TCHAR*)lParam), SIZEOF(data->noAvatarText));
Invalidate(hwnd);
return TRUE;
diff --git a/plugins/AVS/src/options.cpp b/plugins/AVS/src/options.cpp index d6b94ba9a7..0c2b87803c 100644 --- a/plugins/AVS/src/options.cpp +++ b/plugins/AVS/src/options.cpp @@ -68,8 +68,8 @@ static void RemoveProtoPic(const char *szProto) if (strstr(szProto, "Global avatar for")) { char szProtoname[MAX_PATH] = { 0 }; - lstrcpynA(szProtoname, szProto, lstrlenA(szProto) - lstrlenA("accounts")); - lstrcpyA(szProtoname, strrchr(szProtoname, ' ') + 1); + mir_strncpy(szProtoname, szProto, mir_strlen(szProto) - mir_strlen("accounts")); + mir_strcpy(szProtoname, strrchr(szProtoname, ' ') + 1); for (int i = 0; i < g_ProtoPictures.getCount(); i++) { protoPicCacheEntry& p = g_ProtoPictures[i]; @@ -129,7 +129,7 @@ static void SetProtoPic(char *szProto) if (!lstrcmpA(AVS_DEFAULT, szProto)) { for (int i = 0; i < g_ProtoPictures.getCount(); i++) { protoPicCacheEntry& p = g_ProtoPictures[i]; - if (lstrlenA(p.szProtoname) == 0) + if (mir_strlen(p.szProtoname) == 0) continue; if (p.hbmPic == 0 || !lstrcmpA(p.szProtoname, AVS_DEFAULT)) { @@ -140,8 +140,8 @@ static void SetProtoPic(char *szProto) } else if (strstr(szProto, "Global avatar for")) { char szProtoname[MAX_PATH] = { 0 }; - lstrcpynA(szProtoname, szProto, lstrlenA(szProto) - lstrlenA("accounts")); - lstrcpyA(szProtoname, strrchr(szProtoname, ' ') + 1); + mir_strncpy(szProtoname, szProto, mir_strlen(szProto) - mir_strlen("accounts")); + mir_strcpy(szProtoname, strrchr(szProtoname, ' ') + 1); for (int i = 0; i < g_ProtoPictures.getCount(); i++) { PROTOACCOUNT* pdescr = (PROTOACCOUNT*)CallService(MS_PROTO_GETACCOUNT, 0, (LPARAM)g_ProtoPictures[i].szProtoname); if (pdescr == NULL && lstrcmpA(g_ProtoPictures[i].szProtoname, szProto)) @@ -149,7 +149,7 @@ static void SetProtoPic(char *szProto) if (!lstrcmpA(g_ProtoPictures[i].szProtoname, szProto) || !lstrcmpA(pdescr->szProtoName, szProtoname)) { protoPicCacheEntry& p = g_ProtoPictures[i]; - if (lstrlenA(p.szProtoname) != 0) { + if (mir_strlen(p.szProtoname) != 0) { if (p.hbmPic == 0) { CreateAvatarInCache(0, &p, szProto); NotifyEventHooks(hEventChanged, 0, (LPARAM)&p); @@ -161,10 +161,10 @@ static void SetProtoPic(char *szProto) else { for (int i = 0; i < g_ProtoPictures.getCount(); i++) { protoPicCacheEntry& p = g_ProtoPictures[i]; - if (lstrlenA(p.szProtoname) == 0) + if (mir_strlen(p.szProtoname) == 0) break; - if (!strcmp(p.szProtoname, szProto) && lstrlenA(p.szProtoname) == lstrlenA(szProto)) { + if (!strcmp(p.szProtoname, szProto) && mir_strlen(p.szProtoname) == mir_strlen(szProto)) { if (p.hbmPic != 0) DeleteObject(p.hbmPic); ZeroMemory(&p, sizeof(avatarCacheEntry)); diff --git a/plugins/AVS/src/services.cpp b/plugins/AVS/src/services.cpp index 3206546bee..7334939f40 100644 --- a/plugins/AVS/src/services.cpp +++ b/plugins/AVS/src/services.cpp @@ -750,7 +750,7 @@ INT_PTR DrawAvatarPicture(WPARAM wParam, LPARAM lParam) for (int i = 0; i < g_ProtoPictures.getCount(); i++) {
protoPicCacheEntry& p = g_ProtoPictures[i];
- if (!lstrcmpA(p.szProtoname, r->szProto) && lstrlenA(r->szProto) == lstrlenA(p.szProtoname) && p.hbmPic != 0) {
+ if (!lstrcmpA(p.szProtoname, r->szProto) && mir_strlen(r->szProto) == mir_strlen(p.szProtoname) && p.hbmPic != 0) {
ace = (AVATARCACHEENTRY *)&g_ProtoPictures[i];
break;
}
@@ -844,7 +844,7 @@ INT_PTR ReportMyAvatarChanged(WPARAM wParam, LPARAM lParam) continue;
if (!lstrcmpA(g_MyAvatars[i].szProtoname, proto)) {
- LPVOID lpParam = (void *)malloc(lstrlenA(g_MyAvatars[i].szProtoname) + 2);
+ LPVOID lpParam = (void *)malloc(mir_strlen(g_MyAvatars[i].szProtoname) + 2);
strcpy((char *)lpParam, g_MyAvatars[i].szProtoname);
mir_forkthread(ReloadMyAvatar, lpParam);
return 0;
diff --git a/plugins/AVS/src/utils.cpp b/plugins/AVS/src/utils.cpp index d9a4c07229..fdc16d4338 100644 --- a/plugins/AVS/src/utils.cpp +++ b/plugins/AVS/src/utils.cpp @@ -140,7 +140,7 @@ int CreateAvatarInCache(MCONTACT hContact, avatarCacheEntry *ace, char *szProto) }
}
- if (lstrlen(tszFilename) < 4)
+ if (mir_tstrlen(tszFilename) < 4)
return -1;
_tcsncpy_s(tszFilename, VARST(tszFilename), _TRUNCATE);
|