We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 46a2c1f commit d36067fCopy full SHA for d36067f
src/convert_json.cpp
@@ -356,18 +356,10 @@ ModStoreModDetails readModStoreModDetails(Json::Value& details) {
356
}
357
358
//value
359
- if (details["rating"].asString().size()) {
360
-
361
- std::string id_raw = details["rating"].asString();
362
- char* endptr = 0;
363
- float numbervalue = strtof(id_raw.c_str(),&endptr);
364
365
- if ((id_raw != "") && (*endptr == 0)) {
366
- retval.rating = numbervalue;
367
- }
368
369
- else {
370
- retval.rating = 0.0;
+ if (details["value"].isInt()) {
+ retval.rating = details["value"].asInt();
+ } else {
+ retval.rating = 0;
371
372
373
//depends
0 commit comments