summaryrefslogtreecommitdiff
path: root/plugins/CountryFlags
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2013-07-25 20:15:05 +0000
committerKirill Volinsky <mataes2007@gmail.com>2013-07-25 20:15:05 +0000
commit9d32b9cd791fb5f51dad17567152c70a8511a500 (patch)
treefd7aa3250ed409e720f26c341c0a5d736ed8083c /plugins/CountryFlags
parent125a25c86eed41352d45eb8fb6f994f65700c3ec (diff)
replace sprintf to mir_snprintf (part 6)
git-svn-id: http://svn.miranda-ng.org/main/trunk@5485 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/CountryFlags')
-rw-r--r--plugins/CountryFlags/src/extraimg.cpp2
-rw-r--r--plugins/CountryFlags/src/icons.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/plugins/CountryFlags/src/extraimg.cpp b/plugins/CountryFlags/src/extraimg.cpp
index f511ee0cf5..11dfeb9470 100644
--- a/plugins/CountryFlags/src/extraimg.cpp
+++ b/plugins/CountryFlags/src/extraimg.cpp
@@ -55,7 +55,7 @@ static void CALLBACK SetExtraImage(HANDLE hContact)
ExtraIcon_Clear(hExtraIcon, hContact);
else {
char szId[20];
- wsprintfA(szId, (countryNumber == 0xFFFF) ? "%s0x%X" : "%s%i", "flags_", countryNumber);
+ mir_snprintf(szId, SIZEOF(szId), (countryNumber == 0xFFFF) ? "%s0x%X" : "%s%i", "flags_", countryNumber);
ExtraIcon_SetIcon(hExtraIcon, hContact, szId);
}
}
diff --git a/plugins/CountryFlags/src/icons.cpp b/plugins/CountryFlags/src/icons.cpp
index 5724db6a8b..93354139ae 100644
--- a/plugins/CountryFlags/src/icons.cpp
+++ b/plugins/CountryFlags/src/icons.cpp
@@ -146,7 +146,7 @@ HICON __fastcall LoadFlagIcon(int countryNumber)
szCountry = (char*)CallService(MS_UTILS_GETCOUNTRYBYNUMBER, countryNumber = 0xFFFF, 0);
char szId[20];
- wsprintfA(szId, (countryNumber == 0xFFFF) ? "%s0x%X" : "%s%i", "flags_", countryNumber); /* buffer safe */
+ mir_snprintf(szId, SIZEOF(szId), (countryNumber == 0xFFFF) ? "%s0x%X" : "%s%i", "flags_", countryNumber); /* buffer safe */
return Skin_GetIcon(szId);
}
@@ -245,7 +245,7 @@ void InitIcons(void)
sid.pszDescription = (char*)countries[i].szName;
/* create identifier */
- wsprintfA(szId,(countries[i].id == 0xFFFF) ? "%s0x%X" : "%s%i","flags_", countries[i].id); /* buffer safe */
+ mir_snprintf(szId, SIZEOF(szId), (countries[i].id == 0xFFFF) ? "%s0x%X" : "%s%i","flags_", countries[i].id); /* buffer safe */
int index = CountryNumberToBitmapIndex(countries[i].id);
/* create icon */
HICON hIcon = ImageList_GetIcon(himl,index,ILD_NORMAL);