summaryrefslogtreecommitdiff
path: root/plugins/Weather/src/weather_ini.cpp
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2015-05-16 19:04:12 +0000
committerKirill Volinsky <mataes2007@gmail.com>2015-05-16 19:04:12 +0000
commitc49014bbfa57191cd4c52be5d01690a6eef778ac (patch)
treee948c5874557e516821b1e16805bd1a779f60a0a /plugins/Weather/src/weather_ini.cpp
parent3c3d8be323e6630c28c2dac6e0e851bce4b02130 (diff)
fix for strncat use
git-svn-id: http://svn.miranda-ng.org/main/trunk@13650 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Weather/src/weather_ini.cpp')
-rw-r--r--plugins/Weather/src/weather_ini.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/Weather/src/weather_ini.cpp b/plugins/Weather/src/weather_ini.cpp
index 0f81268766..930d2ea828 100644
--- a/plugins/Weather/src/weather_ini.cpp
+++ b/plugins/Weather/src/weather_ini.cpp
@@ -183,7 +183,7 @@ bool LoadWIData(bool dial)
if (chop == NULL)
return false;
*chop = '\0';
- _tcsncat(szSearchPath, _T("\\Plugins\\Weather\\*.ini"),MAX_PATH - 1);
+ _tcsncat(szSearchPath, _T("\\Plugins\\Weather\\*.ini"), SIZEOF(szSearchPath) - mir_tstrlen(szSearchPath));
_tcsncpy(FileName, szSearchPath, MAX_PATH - 1);
WIN32_FIND_DATA fd;
@@ -195,7 +195,7 @@ bool LoadWIData(bool dial)
do {
chop = _tcsrchr(FileName, '\\');
chop[1] = '\0';
- _tcsncat(FileName, fd.cFileName, SIZEOF(FileName) - 1);
+ _tcsncat(FileName, fd.cFileName, SIZEOF(FileName) - mir_tstrlen(FileName));
if ( _tcsicmp(fd.cFileName, _T("SAMPLE_INI.INI"))) {
WIDATA Data;
LoadStationData(FileName, fd.cFileName, &Data);
@@ -567,7 +567,7 @@ INT_PTR CALLBACK DlgProcSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar
TCHAR *chop = _tcsrchr(szPath, '\\');
if (chop) {
*chop = '\0';
- _tcsncat(szPath, _T("\\Plugins\\weather\\"),SIZEOF(szPath) - 1);
+ _tcsncat(szPath, _T("\\Plugins\\weather\\"), SIZEOF(szPath) - mir_tstrlen(szPath));
_tmkdir(szPath);
ShellExecute((HWND)lParam, _T("open"), szPath, _T(""), _T(""), SW_SHOW);
}