From 89bf70db6034d16a932e0415ef5ba0a1e5b35bbf Mon Sep 17 00:00:00 2001 From: VladimirMangos Date: Wed, 11 Aug 2010 22:54:08 +0400 Subject: [PATCH] [10346] Fixed crash in .send items Also fixed some missed cases from prev. typo fix. --- src/game/Chat.cpp | 4 ++-- src/game/Level3.cpp | 4 ++-- src/shared/revision_nr.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/game/Chat.cpp b/src/game/Chat.cpp index bfd293308d5..377d276f5db 100644 --- a/src/game/Chat.cpp +++ b/src/game/Chat.cpp @@ -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 }, diff --git a/src/game/Level3.cpp b/src/game/Level3.cpp index feecfa6d7e3..505a03ea1f7 100644 --- a/src/game/Level3.cpp +++ b/src/game/Level3.cpp @@ -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) diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index c6521a58839..1abf0430b34 100644 --- a/src/shared/revision_nr.h +++ b/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__