diff --git a/src/rpc/rpcevo.cpp b/src/rpc/rpcevo.cpp index dd0af4c47e495..d2cf35f07537e 100644 --- a/src/rpc/rpcevo.cpp +++ b/src/rpc/rpcevo.cpp @@ -766,7 +766,7 @@ UniValue protx_revoke(const JSONRPCRequest& request) if (request.params.size() > 3) { int32_t nReason = ParseInt32V(request.params[3], "reason"); - if (nReason < 0 || nReason >= CProUpRevTx::REASON_LAST) { + if (nReason < 0 || nReason > CProUpRevTx::REASON_LAST) { throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("invalid reason %d, must be between 0 and %d", nReason, CProUpRevTx::REASON_LAST)); } ptx.nReason = (uint16_t)nReason;