mirror of
https://github.com/Sude-/lgogdownloader.git
synced 2024-11-20 11:49:17 +01:00
Fix "Type is not convertible to string" error in Downloader::getGames
On some systems the integer to string conversion caused std::runtime_error "Type is not convertible to string"
This commit is contained in:
parent
8c1ee17d4b
commit
5af5a286e7
@ -2074,7 +2074,7 @@ std::vector<gameItem> Downloader::getGames()
|
||||
Json::Value product = root["products"][i];
|
||||
gameItem game;
|
||||
game.name = product["slug"].asString();
|
||||
game.id = product["id"].asString();
|
||||
game.id = product["id"].isInt() ? std::to_string(product["id"].asInt()) : product["id"].asString();
|
||||
|
||||
unsigned int platform = 0;
|
||||
if (product["worksOn"]["Windows"].asBool())
|
||||
|
Loading…
Reference in New Issue
Block a user