diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2015-03-30 19:21:44 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2015-03-30 19:21:44 +0000 |
commit | 02ac3e7c9a90243ab30c7ea0f780e498262123e1 (patch) | |
tree | 2e28e113ed3287eef2e66551b3e8afd9dff2182f /plugins/Weather/src/weather_update.cpp | |
parent | 717a61c4ad2d5059b6403c492d666b2b09e1fd6c (diff) |
Weather:
- Minor fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@12555 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Weather/src/weather_update.cpp')
-rw-r--r-- | plugins/Weather/src/weather_update.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/Weather/src/weather_update.cpp b/plugins/Weather/src/weather_update.cpp index 612f536b5c..290303d372 100644 --- a/plugins/Weather/src/weather_update.cpp +++ b/plugins/Weather/src/weather_update.cpp @@ -60,9 +60,9 @@ int UpdateWeather(MCONTACT hContact) // show warnings by popup
mir_sntprintf(str, SIZEOF(str) - 105,
TranslateT("Unable to retrieve weather information for %s"), dbv.ptszVal);
- _tcscat(str, _T("\n"));
+ _tcsncat(str, _T("\n"), SIZEOF(str) - 1);
TCHAR *tszError = GetError(code);
- _tcscat(str, tszError);
+ _tcsncat(str, tszError, SIZEOF(str) - 1);
WPShowMessage(str, SM_WARNING);
mir_free(tszError);
}
@@ -458,7 +458,7 @@ int GetWeatherData(MCONTACT hContact) // to get a data value.
GetDataValue(&Item->Item, DataValue, &szInfo);
if ( _tcscmp(Item->Item.Name, _T("Condition")) && _tcsicmp(Item->Item.Unit, _T("Cond")))
- _tcscpy(DataValue, TranslateTS(DataValue));
+ _tcsncpy(DataValue, TranslateTS(DataValue), MAX_DATA_LEN - 1);
break;
case WID_SET:
|