mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-12-24 19:01:56 +01:00
-fixed cover download crash if no {loc} is in url_full_covers
This commit is contained in:
parent
2562347f6c
commit
895101a6a4
@ -119,7 +119,8 @@ static string countryCode(const string &gameId)
|
|||||||
static string makeURL(const string format, const string gameId, const string country)
|
static string makeURL(const string format, const string gameId, const string country)
|
||||||
{
|
{
|
||||||
string url = format;
|
string url = format;
|
||||||
url.replace(url.find(TAG_LOC), strlen(TAG_LOC), country.c_str());
|
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());
|
url.replace(url.find(TAG_GAME_ID), strlen(TAG_GAME_ID), gameId.c_str());
|
||||||
|
|
||||||
return url;
|
return url;
|
||||||
|
Loading…
Reference in New Issue
Block a user