diff options
-rw-r--r-- | xbmc/utils/ScraperUrl.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/xbmc/utils/ScraperUrl.cpp b/xbmc/utils/ScraperUrl.cpp index 470d18aeda..d9c38ccad6 100644 --- a/xbmc/utils/ScraperUrl.cpp +++ b/xbmc/utils/ScraperUrl.cpp @@ -214,10 +214,9 @@ bool CScraperUrl::Get(const SUrlEntry& scrURL, std::string& strHTML, XFILE::CCur XFILE::CFile file; if (file.Open(strCachePath)) { - char* temp = new char[(int)file.GetLength()]; - file.Read(temp,file.GetLength()); - strHTML.clear(); - strHTML.append(temp,temp+file.GetLength()); + size_t flen = file.GetLength(); + char* temp = new char[flen]; + strHTML.assign(temp, file.Read(temp, flen)); file.Close(); delete[] temp; return true; |