[10346] Fixed crash in .send items

Also fixed some missed cases from prev. typo fix.
This commit is contained in:
VladimirMangos 2010-08-11 22:54:08 +04:00
parent 29281d476a
commit 3c5da27442
3 changed files with 5 additions and 5 deletions

View file

@ -88,7 +88,7 @@ ChatCommand * ChatHandler::getCommandTable()
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand achievementCreateriaCommandTable[] =
static ChatCommand achievementCriteriaCommandTable[] =
{
{ "add", SEC_ADMINISTRATOR, true, &ChatHandler::HandleAchievementCriteriaAddCommand, "", NULL },
{ "remove", SEC_ADMINISTRATOR, true, &ChatHandler::HandleAchievementCriteriaRemoveCommand,"", NULL },
@ -97,7 +97,7 @@ ChatCommand * ChatHandler::getCommandTable()
static ChatCommand achievementCommandTable[] =
{
{ "createria", SEC_ADMINISTRATOR, true, NULL, "", achievementCreateriaCommandTable },
{ "criteria", SEC_ADMINISTRATOR, true, NULL, "", achievementCriteriaCommandTable },
{ "add", SEC_ADMINISTRATOR, true, &ChatHandler::HandleAchievementAddCommand, "", NULL },
{ "remove", SEC_ADMINISTRATOR, true, &ChatHandler::HandleAchievementRemoveCommand, "", NULL },
{ "", SEC_ADMINISTRATOR, true, &ChatHandler::HandleAchievementCommand, "", NULL },

View file

@ -6464,8 +6464,8 @@ bool ChatHandler::HandleSendItemsCommand(char* args)
// parse item str
uint32 item_id = 0;
uint32 item_count = 1;
if (sscanf(itemStr, "%u:%u", item_id, item_count) != 2)
if (sscanf(itemStr, "%u", item_id) != 1)
if (sscanf(itemStr, "%u:%u", &item_id, &item_count) != 2)
if (sscanf(itemStr, "%u", &item_id) != 1)
return false;
if(!item_id)

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "10345"
#define REVISION_NR "10346"
#endif // __REVISION_NR_H__