summaryrefslogtreecommitdiff
path: root/plugins/PluginUpdater
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-05-20 13:29:50 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-05-20 13:29:50 +0000
commite65275ca7f85bf05233f5636cf879d9fc44cb4fa (patch)
treedb22b44823525f89390f551caf8d085e2773b719 /plugins/PluginUpdater
parentb330de2b0bcf4d09a417c0ef154c3419b6930316 (diff)
crash fix for PU
git-svn-id: http://svn.miranda-ng.org/main/trunk@4761 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/PluginUpdater')
-rw-r--r--plugins/PluginUpdater/src/Scanner.cpp6
1 files 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, '\\'))