Skip to content

Commit

Permalink
Fix rtrim leaving dot behind (#1282)
Browse files Browse the repository at this point in the history
  • Loading branch information
prasannavl authored May 24, 2022
1 parent 3a21801 commit 083ce14
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/masternodes/govvariables/attributes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,9 @@ UniValue ATTRIBUTES::ExportFiltered(GovVarsFilter filter, const std::string &pre
} else {
auto decimalStr = GetDecimaleString(*amount);
rtrim(decimalStr, '0');
if (decimalStr.back() == '.') {
decimalStr.pop_back();
}
ret.pushKV(key, decimalStr);
}
} else if (auto balances = boost::get<const CBalances>(&attribute.second)) {
Expand Down

0 comments on commit 083ce14

Please sign in to comment.