diff options
author | vdrfan <vdrfan@svn> | 2010-11-16 06:37:32 +0000 |
---|---|---|
committer | vdrfan <vdrfan@svn> | 2010-11-16 06:37:32 +0000 |
commit | 95dca852708c6e135997df6c825029cfb4b30caa (patch) | |
tree | 10bbf8ebfdfdc548324990ba1874f9b78f7162f6 | |
parent | 4c7ddb196cb023015d57364170d2c9a2194460d6 (diff) |
fixed: #10680 - Year overflow in plugins
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@35283 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
-rw-r--r-- | xbmc/DateTime.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/xbmc/DateTime.cpp b/xbmc/DateTime.cpp index 30a90119a6..613625a9b0 100644 --- a/xbmc/DateTime.cpp +++ b/xbmc/DateTime.cpp @@ -681,6 +681,12 @@ void CDateTime::FromULargeInt(const ULARGE_INTEGER& time) void CDateTime::SetFromDateString(const CStdString &date) { + if (date.IsEmpty()) + { + SetValid(false); + return; + } + const char* months[] = {"january","february","march","april","may","june","july","august","september","october","november","december",NULL}; int j=0; int iDayPos = date.Find("day"); @@ -1239,4 +1245,4 @@ CStdString CDateTime::GetAsRFC1123DateTime() const CStdString result; result.Format("%s, %02i %s %04i %02i:%02i:%02i GMT", DAY_NAMES[time.GetDayOfWeek()], time.GetDay(), MONTH_NAMES[time.GetMonth()-1], time.GetYear(), time.GetHour(), time.GetMinute(), time.GetSecond()); return result; -}
\ No newline at end of file +} |