Fix mod store rating

This commit is contained in:
ShadowNinja 2014-09-19 15:41:28 -04:00
parent 46a2c1f167
commit d36067fda5

@ -356,18 +356,10 @@ ModStoreModDetails readModStoreModDetails(Json::Value& details) {
}
//value
if (details["rating"].asString().size()) {
std::string id_raw = details["rating"].asString();
char* endptr = 0;
float numbervalue = strtof(id_raw.c_str(),&endptr);
if ((id_raw != "") && (*endptr == 0)) {
retval.rating = numbervalue;
}
}
else {
retval.rating = 0.0;
if (details["value"].isInt()) {
retval.rating = details["value"].asInt();
} else {
retval.rating = 0;
}
//depends