mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-17 18:40:09 +00:00
Merge #8172: Fix two warnings for comparison between signed and unsigned
77f63a4 Fix two warnings for comparison between signed and unsigned (Pieter Wuille)
This commit is contained in:
commit
7e6dd7bee4
@ -2457,7 +2457,7 @@ UniValue fundrawtransaction(const UniValue& params, bool fHelp)
|
|||||||
if (origTx.vout.size() == 0)
|
if (origTx.vout.size() == 0)
|
||||||
throw JSONRPCError(RPC_INVALID_PARAMETER, "TX must have at least one output");
|
throw JSONRPCError(RPC_INVALID_PARAMETER, "TX must have at least one output");
|
||||||
|
|
||||||
if (changePosition != -1 && (changePosition < 0 || changePosition > origTx.vout.size()))
|
if (changePosition != -1 && (changePosition < 0 || (unsigned int)changePosition > origTx.vout.size()))
|
||||||
throw JSONRPCError(RPC_INVALID_PARAMETER, "changePosition out of bounds");
|
throw JSONRPCError(RPC_INVALID_PARAMETER, "changePosition out of bounds");
|
||||||
|
|
||||||
CMutableTransaction tx(origTx);
|
CMutableTransaction tx(origTx);
|
||||||
|
@ -2232,7 +2232,7 @@ bool CWallet::CreateTransaction(const vector<CRecipient>& vecSend, CWalletTx& wt
|
|||||||
// Insert change txn at random position:
|
// Insert change txn at random position:
|
||||||
nChangePosInOut = GetRandInt(txNew.vout.size()+1);
|
nChangePosInOut = GetRandInt(txNew.vout.size()+1);
|
||||||
}
|
}
|
||||||
else if (nChangePosInOut > txNew.vout.size())
|
else if ((unsigned int)nChangePosInOut > txNew.vout.size())
|
||||||
{
|
{
|
||||||
strFailReason = _("Change index out of range");
|
strFailReason = _("Change index out of range");
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user