From 01de930753fd7a5d47c0350a4361949d770b93cf Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Mon, 22 Jul 2013 13:38:03 +0000 Subject: replace sprintf to mir_snprintf (part 1) git-svn-id: http://svn.miranda-ng.org/main/trunk@5446 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Weather/src/weather_info.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'plugins/Weather/src') diff --git a/plugins/Weather/src/weather_info.cpp b/plugins/Weather/src/weather_info.cpp index 7b95614088..da31eabb5b 100644 --- a/plugins/Weather/src/weather_info.cpp +++ b/plugins/Weather/src/weather_info.cpp @@ -152,13 +152,13 @@ void GetINIInfo(TCHAR *pszSvc) // if the service does not exist among the loaded INI's if (sData == NULL) { - wsprintf(str2, TranslateT("The corresponding INI file for \"%s\" is not found."), pszSvc); + mir_sntprintf(str2, SIZEOF(str2), TranslateT("The corresponding INI file for \"%s\" is not found."), pszSvc); MessageBox(NULL, str2, TranslateT("Weather INI information"), MB_OK|MB_ICONINFORMATION); } // if exist, get the information else { - wsprintf(str2, TranslateT("Weather INI information for \"%s\":"), pszSvc); + mir_sntprintf(str2, SIZEOF(str2), TranslateT("Weather INI information for \"%s\":"), pszSvc); _tcscat(str2,_T("\n\n")); _tcscat(str2, TranslateT("Name:")); _tcscat(str2,_T("\t\t")); @@ -192,9 +192,9 @@ void GetINIInfo(TCHAR *pszSvc) _tcscat(str2, sData->ShortFileName); _tcscat(str2, _T("\n")); _tcscat(str2, TranslateT("Item Count:")); - wsprintf(str2, _T("%s\t%i\n"), str2, sData->UpdateDataCount); + mir_sntprintf(str2, SIZEOF(str2), _T("%s\t%i\n"), str2, sData->UpdateDataCount); _tcscat(str2, TranslateT("Memory Used:")); - wsprintf(str2, _T("%s\t%i "), str2, sData->MemUsed); + mir_sntprintf(str2, SIZEOF(str2), _T("%s\t%i "), str2, sData->MemUsed); _tcscat(str2, TranslateT("bytes")); _tcscat(str2,_T("\n\n")); _tcscat(str2, TranslateT("Description:")); @@ -228,7 +228,7 @@ void MoreVarList(void) // the custom variable is defined as "%[]" // ignore the "hi" item and hidden items if ( _tcscmp(WItem->Item.Name, _T("Ignore")) && WItem->Item.Name[0] != '#') { - wsprintf(tempstr, _T("%c[%s]"), '%', WItem->Item.Name); + mir_sntprintf(tempstr, SIZEOF(tempstr), _T("%c[%s]"), '%', WItem->Item.Name); TCHAR* find = _tcsstr(str, tempstr); // if the custom variable does not exist in the list, add it to the list if (find == NULL) { -- cgit v1.2.3