From: user Date: Sun, 26 Dec 2021 09:34:59 +0000 (+0300) Subject: Fix amount checking X-Git-Tag: nvc-v0.5.9~29 X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=commitdiff_plain;h=6dbd6a9af126833e1b9b9fcdf2b7d4a486fd2897 Fix amount checking --- diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp index 445f68c..06263b0 100644 --- a/src/bitcoinrpc.cpp +++ b/src/bitcoinrpc.cpp @@ -85,7 +85,7 @@ void RPCTypeCheck(const Object& o, int64_t AmountFromValue(const Value& value) { double dAmount = value.get_real(); - if (dAmount <= 0.0 || dAmount > MAX_MONEY) + if (dAmount <= 0.0 || dAmount > (double) (MAX_MONEY / 100000000)) throw JSONRPCError(RPC_TYPE_ERROR, "Invalid amount"); int64_t nAmount = roundint64(dAmount * COIN); if (!MoneyRange(nAmount))