diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 3b5d06fb4..0193f9fd2 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -5153,7 +5153,10 @@ UniValue z_sendmany(const UniValue& params, bool fHelp, const CPubKey& mypk) CAmount nTotalOut = 0; // Optional OP_RETURN data CScript opret; - UniValue opretValue = params.size() >= 4 ? params[4].get_str() : ""; + UniValue opretValue; + if(params.size() == 5) { + opretValue = params[4].get_str(); + } bool containsSaplingOutput = false;