summaryrefslogtreecommitdiff
path: root/plugins/Weather/src/weather_data.cpp
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2015-03-30 19:21:44 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2015-03-30 19:21:44 +0000
commit02ac3e7c9a90243ab30c7ea0f780e498262123e1 (patch)
tree2e28e113ed3287eef2e66551b3e8afd9dff2182f /plugins/Weather/src/weather_data.cpp
parent717a61c4ad2d5059b6403c492d666b2b09e1fd6c (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_data.cpp')
-rw-r--r--plugins/Weather/src/weather_data.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/plugins/Weather/src/weather_data.cpp b/plugins/Weather/src/weather_data.cpp
index 5141f24ef3..fd33528024 100644
--- a/plugins/Weather/src/weather_data.cpp
+++ b/plugins/Weather/src/weather_data.cpp
@@ -50,35 +50,35 @@ WEATHERINFO LoadWeatherInfo(MCONTACT hContact)
GetStationID(hContact, winfo.id, SIZEOF(winfo.id));
if (DBGetStaticString(hContact, WEATHERPROTONAME, "Nick", winfo.city, SIZEOF(winfo.city)))
- _tcscpy(winfo.city, NODATA);
+ _tcsncpy(winfo.city, NODATA, SIZEOF(winfo.city) - 1);
if (DBGetStaticString(hContact, WEATHERCONDITION, "Update", winfo.update, SIZEOF(winfo.update)))
- _tcscpy(winfo.update, NODATA);
+ _tcsncpy(winfo.update, NODATA, SIZEOF(winfo.update) - 1);
if (DBGetStaticString(hContact, WEATHERCONDITION, "Condition", winfo.cond, SIZEOF(winfo.cond)))
- _tcscpy(winfo.cond, NODATA);
+ _tcsncpy(winfo.cond, NODATA, SIZEOF(winfo.cond) - 1);
if (DBGetStaticString(hContact, WEATHERCONDITION, "Temperature", winfo.temp, SIZEOF(winfo.temp)))
- _tcscpy(winfo.temp, NODATA);
+ _tcsncpy(winfo.temp, NODATA, SIZEOF(winfo.temp) - 1);
if (DBGetStaticString(hContact, WEATHERCONDITION, "High", winfo.high, SIZEOF(winfo.high)))
- _tcscpy(winfo.high, NODATA);
+ _tcsncpy(winfo.high, NODATA, SIZEOF(winfo.high) - 1);
if (DBGetStaticString(hContact, WEATHERCONDITION, "Low", winfo.low, SIZEOF(winfo.low)))
- _tcscpy(winfo.low, NODATA);
+ _tcsncpy(winfo.low, NODATA, SIZEOF(winfo.low) - 1);
if (DBGetStaticString(hContact, WEATHERCONDITION, "Sunset", winfo.sunset, SIZEOF(winfo.sunset)))
- _tcscpy(winfo.sunset, NODATA);
+ _tcsncpy(winfo.sunset, NODATA, SIZEOF(winfo.sunset) - 1);
if (DBGetStaticString(hContact, WEATHERCONDITION, "Sunrise", winfo.sunrise, SIZEOF(winfo.sunrise)))
- _tcscpy(winfo.sunrise, NODATA);
+ _tcsncpy(winfo.sunrise, NODATA, SIZEOF(winfo.sunrise) - 1);
if (DBGetStaticString(hContact, WEATHERCONDITION, "Wind Speed", winfo.wind, SIZEOF(winfo.wind)))
- _tcscpy(winfo.wind, NODATA);
+ _tcsncpy(winfo.wind, NODATA, SIZEOF(winfo.wind) - 1);
if (DBGetStaticString(hContact, WEATHERCONDITION, "Wind Direction", winfo.winddir, SIZEOF(winfo.winddir)))
- _tcscpy(winfo.winddir, NODATA);
+ _tcsncpy(winfo.winddir, NODATA, SIZEOF(winfo.winddir) - 1);
if (DBGetStaticString(hContact, WEATHERCONDITION, "Dewpoint", winfo.dewpoint, SIZEOF(winfo.dewpoint)))
- _tcscpy(winfo.dewpoint, NODATA);
+ _tcsncpy(winfo.dewpoint, NODATA, SIZEOF(winfo.dewpoint) - 1);
if (DBGetStaticString(hContact, WEATHERCONDITION, "Pressure", winfo.pressure, SIZEOF(winfo.pressure)))
- _tcscpy(winfo.pressure, NODATA);
+ _tcsncpy(winfo.pressure, NODATA, SIZEOF(winfo.pressure) - 1);
if (DBGetStaticString(hContact, WEATHERCONDITION, "Visibility", winfo.vis, SIZEOF(winfo.vis)))
- _tcscpy(winfo.vis, NODATA);
+ _tcsncpy(winfo.vis, NODATA, SIZEOF(winfo.vis) - 1);
if (DBGetStaticString(hContact, WEATHERCONDITION, "Humidity", winfo.humid, SIZEOF(winfo.humid)))
- _tcscpy(winfo.humid, NODATA);
+ _tcsncpy(winfo.humid, NODATA, SIZEOF(winfo.humid) - 1);
if (DBGetStaticString(hContact, WEATHERCONDITION, "Feel", winfo.feel, SIZEOF(winfo.feel)))
- _tcscpy(winfo.feel, NODATA);
+ _tcsncpy(winfo.feel, NODATA, SIZEOF(winfo.feel) - 1);
winfo.status = (WORD)db_get_w(hContact, WEATHERPROTONAME, "StatusIcon", ID_STATUS_OFFLINE);
return winfo;
@@ -176,7 +176,7 @@ void EraseAllInfo()
// in case where the default station is missing
if (opt.DefStn == NULL && ContactCount != 0) {
if ( !db_get_ts(LastContact, WEATHERPROTONAME, "ID", &dbv)) {
- _tcscpy(opt.Default, dbv.ptszVal);
+ _tcsncpy(opt.Default, dbv.ptszVal, SIZEOF(opt.Default) - 1);
db_free(&dbv);
}
opt.DefStn = LastContact;