From e65275ca7f85bf05233f5636cf879d9fc44cb4fa Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 20 May 2013 13:29:50 +0000 Subject: crash fix for PU git-svn-id: http://svn.miranda-ng.org/main/trunk@4761 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/PluginUpdater/src/Scanner.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/plugins/PluginUpdater/src/Scanner.cpp b/plugins/PluginUpdater/src/Scanner.cpp index c3659a6275..47dd5b3b9a 100644 --- a/plugins/PluginUpdater/src/Scanner.cpp +++ b/plugins/PluginUpdater/src/Scanner.cpp @@ -506,12 +506,10 @@ static void GetList(void *) TCHAR tszRelFileName[MAX_PATH]; _tcscpy(tszRelFileName, hash.m_name); - tp = _tcschr(tszRelFileName, L'.'); *tp = 0; - tp = _tcschr(tszRelFileName, L'\\'); - tp = (p) ? tp+1 : tszRelFileName; + tp = _tcsrchr(tszRelFileName, L'.'); if (tp) *tp = 0; + tp = _tcschr(tszRelFileName, L'\\'); if (tp) tp++; else tp = tszRelFileName; _tcslwr(tp); - mir_sntprintf(FileInfo->File.tszDiskPath, SIZEOF(FileInfo->File.tszDiskPath), _T("%s\\Temp\\%s.zip"), tszRoot, tszFileName); mir_sntprintf(FileInfo->File.tszDownloadURL, SIZEOF(FileInfo->File.tszDownloadURL), _T("%s/%s.zip"), tszBaseUrl, tszRelFileName); for (tp = _tcschr(FileInfo->File.tszDownloadURL, '\\'); tp != 0; tp = _tcschr(tp, '\\')) -- cgit v1.2.3