Merge pull request #1944 from PolpOnline/master

This commit is contained in:
Alex 2023-01-23 09:22:27 +01:00 committed by GitHub
commit 5182fadede
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -209,8 +209,8 @@ void waybar::modules::Custom::parseOutputJson() {
class_.push_back(c.asString()); class_.push_back(c.asString());
} }
} }
if (!parsed["percentage"].asString().empty() && parsed["percentage"].isUInt()) { if (!parsed["percentage"].asString().empty() && parsed["percentage"].isNumeric()) {
percentage_ = parsed["percentage"].asUInt(); percentage_ = (int) lround(parsed["percentage"].asFloat());
} else { } else {
percentage_ = 0; percentage_ = 0;
} }