From 1f05dbd06d896849d16b026bfc3315ee8b73a89f Mon Sep 17 00:00:00 2001 From: practicalswift Date: Mon, 16 Nov 2020 16:44:50 +0000 Subject: util: Avoid invalid integer negation in ValueFromAmount: make ValueFromAmount(const CAmount& n) well-defined also when n is std::numeric_limits::min() --- src/core_io.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core_io.h') diff --git a/src/core_io.h b/src/core_io.h index 5469a760ee..01340ae2ee 100644 --- a/src/core_io.h +++ b/src/core_io.h @@ -40,7 +40,7 @@ std::vector ParseHexUV(const UniValue& v, const std::string& strN int ParseSighashString(const UniValue& sighash); // core_write.cpp -UniValue ValueFromAmount(const CAmount& amount); +UniValue ValueFromAmount(const CAmount amount); std::string FormatScript(const CScript& script); std::string EncodeHexTx(const CTransaction& tx, const int serializeFlags = 0); std::string SighashToStr(unsigned char sighash_type); -- cgit v1.2.3