if u do /createitem ItemName.
and the gm typed an item name that is bigger then 21 chars it crashes becouse the name dosnt suport more then 21 chars heres fix.
goto
Code: Select all
CGame::AdminOrder_CreateItem
Code: Select all
token = pStrTok->pGet();
token = pStrTok->pGet();
Code: Select all
pItem = new class CItem;
Code: Select all
// if the token is something it is an item name
if (token != NULL) {
if(strlen(token) > 21) return;
ZeroMemory(cItemName, sizeof(cItemName));
strcpy(cItemName, token);
} // close if (token != NULL) {
// if the 2nd token is true it is the item attribute
ZeroMemory(cAttribute, sizeof(cAttribute));
token = pStrTok->pGet();
if (token != NULL) {
if(strlen(token) > 256) return;
ZeroMemory(cAttribute, sizeof(cAttribute));
strcpy(cAttribute, token);
} // close if (token != NULL) {
// if the 3rd token is true it is the item value
ZeroMemory(cValue, sizeof(cValue));
iValue = 0;
token = pStrTok->pGet();
if (token != NULL) {
if(strlen(token) > 256) return;
ZeroMemory(cValue, sizeof(cValue));
strcpy(cValue, token);
iValue = atoi(cValue);
} // close if (token != NULL) {