diff options
author | practicalswift <practicalswift@users.noreply.github.com> | 2020-11-16 15:42:36 +0000 |
---|---|---|
committer | practicalswift <practicalswift@users.noreply.github.com> | 2021-03-02 16:05:28 +0000 |
commit | 7cc75c9ba38e516067e5a4ab84311c62ddddced7 (patch) | |
tree | f0f5f34a5fdb9d4b1f53955cb2ae6044fa426575 /src/util/moneystr.h | |
parent | b9f41df1ead4b6a83a51fc41966b111c8459c313 (diff) | |
download | bitcoin-7cc75c9ba38e516067e5a4ab84311c62ddddced7.tar.xz |
util: Avoid invalid integer negation in FormatMoney: make FormatMoney(const CAmount& n) well-defined also when n is std::numeric_limits<CAmount>::min()
Diffstat (limited to 'src/util/moneystr.h')
-rw-r--r-- | src/util/moneystr.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/moneystr.h b/src/util/moneystr.h index da7f673cda..2aedbee358 100644 --- a/src/util/moneystr.h +++ b/src/util/moneystr.h @@ -17,7 +17,7 @@ /* Do not use these functions to represent or parse monetary amounts to or from * JSON but use AmountFromValue and ValueFromAmount for that. */ -std::string FormatMoney(const CAmount& n); +std::string FormatMoney(const CAmount n); /** Parse an amount denoted in full coins. E.g. "0.0034" supplied on the command line. **/ [[nodiscard]] bool ParseMoney(const std::string& str, CAmount& nRet); |