mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
Better args checking in .sendmoney command.
This commit is contained in:
parent
5905aec683
commit
92f39fe2c3
1 changed files with 2 additions and 1 deletions
|
|
@ -6324,7 +6324,8 @@ bool ChatHandler::HandleSendMoneyCommand(const char* args)
|
||||||
if (!msgText)
|
if (!msgText)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
int32 money = atoi(strtok(NULL, ""));
|
char* money_str = strtok(NULL, "");
|
||||||
|
int32 money = money_str ? atoi(money_str) : 0;
|
||||||
if (money <= 0)
|
if (money <= 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue