Skip to content

Commit

Permalink
[10346] Fixed crash in .send items
Browse files Browse the repository at this point in the history
Also fixed some missed cases from prev. typo fix.
  • Loading branch information
VladimirMangos committed Aug 11, 2010
1 parent 4a18180 commit 89bf70d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/game/Chat.cpp
Expand Up @@ -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 },
Expand All @@ -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 },
Expand Down
4 changes: 2 additions & 2 deletions src/game/Level3.cpp
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "10345"
#define REVISION_NR "10346"
#endif // __REVISION_NR_H__

0 comments on commit 89bf70d

Please sign in to comment.