fix crash reported by ankostis

This commit is contained in:
Miguel Freitas 2014-04-01 22:23:24 -03:00
parent dd60566857
commit 4509ff7e3f

View File

@ -1690,7 +1690,7 @@ Value getposts(const Array& params, bool fHelp)
Value getdirectmsgs(const Array& params, bool fHelp) Value getdirectmsgs(const Array& params, bool fHelp)
{ {
if (fHelp || params.size() < 2 || params.size() > 3) if (fHelp || params.size() != 3)
throw runtime_error( throw runtime_error(
"getdirectmsgs <localuser> <count_per_user> '[{\"username\":username,\"max_id\":max_id,\"since_id\":since_id},...]'\n" "getdirectmsgs <localuser> <count_per_user> '[{\"username\":username,\"max_id\":max_id,\"since_id\":since_id},...]'\n"
"get (locally stored) decrypted direct messages sent/received by user <localuser>\n" "get (locally stored) decrypted direct messages sent/received by user <localuser>\n"