-fixed cover download crash if no {loc} is in url_full_covers

This commit is contained in:
fix94.1 2012-01-31 19:27:34 +00:00
parent 2562347f6c
commit 895101a6a4

View File

@ -119,6 +119,7 @@ static string countryCode(const string &gameId)
static string makeURL(const string format, const string gameId, const string country)
{
string url = format;
if (url.find(TAG_LOC) == 0) //check if {loc} is in the URL before trying to replace it
url.replace(url.find(TAG_LOC), strlen(TAG_LOC), country.c_str());
url.replace(url.find(TAG_GAME_ID), strlen(TAG_GAME_ID), gameId.c_str());