summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/NewsAggregator/Src/Utils.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/NewsAggregator/Src/Utils.cpp b/plugins/NewsAggregator/Src/Utils.cpp
index 7788ed4a18..b8d9f56375 100644
--- a/plugins/NewsAggregator/Src/Utils.cpp
+++ b/plugins/NewsAggregator/Src/Utils.cpp
@@ -206,10 +206,12 @@ time_t __stdcall DateToUnixTime(const TCHAR *stamp, bool FeedType)
}
}
else {
- TCHAR weekday[4], monthstr[4], timezonesign[2];
+ TCHAR *weekday, monthstr[4], timezonesign[2];
int day, month, year, hour, min, sec, timezoneh, timezonem;
if (_tcsstr(p, _T(","))) {
- _stscanf(p, _T("%3s, %d %3s %d %d:%d:%d %1s%02d%02d"), &weekday, &day, &monthstr, &year, &hour, &min, &sec, &timezonesign, &timezoneh, &timezonem);
+ weekday = _tcstok(p, _T(","));
+ p = _tcstok(NULL, _T(","));
+ _stscanf(p + 1, _T("%d %3s %d %d:%d:%d %1s%02d%02d"), &day, &monthstr, &year, &hour, &min, &sec, &timezonesign, &timezoneh, &timezonem);
if (!mir_tstrcmpi(monthstr, _T("Jan")))
month = 1;
if (!mir_tstrcmpi(monthstr, _T("Feb")))