From c49014bbfa57191cd4c52be5d01690a6eef778ac Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sat, 16 May 2015 19:04:12 +0000 Subject: fix for strncat use git-svn-id: http://svn.miranda-ng.org/main/trunk@13650 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Weather/src/weather_update.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/Weather/src/weather_update.cpp') diff --git a/plugins/Weather/src/weather_update.cpp b/plugins/Weather/src/weather_update.cpp index 290303d372..b202fcd56b 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); - _tcsncat(str, _T("\n"), SIZEOF(str) - 1); + _tcsncat(str, _T("\n"), SIZEOF(str) - mir_tstrlen(str)); TCHAR *tszError = GetError(code); - _tcsncat(str, tszError, SIZEOF(str) - 1); + _tcsncat(str, tszError, SIZEOF(str) - mir_tstrlen(str)); WPShowMessage(str, SM_WARNING); mir_free(tszError); } -- cgit v1.2.3