itemdb item type range check fixed, bugreport:5140

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15207 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
shennetsind 2011-12-22 09:10:26 +00:00
parent 6dd5c7ff19
commit 594f5c0873

View File

@ -764,7 +764,7 @@ static bool itemdb_parse_dbrow(char** str, const char* source, int line, int scr
id->type = atoi(str[3]); id->type = atoi(str[3]);
if( id->type < 0 || id->type == IT_UNKNOWN || id->type == IT_UNKNOWN2 || ( id->type > IT_THROWWEAPON && id->type < IT_CASH ) || id->type >= IT_MAX ) if( id->type < 0 || id->type == IT_UNKNOWN || id->type == IT_UNKNOWN2 || ( id->type > IT_DELAYCONSUME && id->type < IT_THROWWEAPON ) || id->type >= IT_MAX )
{// catch invalid item types {// catch invalid item types
ShowWarning("itemdb_parse_dbrow: Invalid item type %d for item %d. IT_ETC will be used.\n", id->type, nameid); ShowWarning("itemdb_parse_dbrow: Invalid item type %d for item %d. IT_ETC will be used.\n", id->type, nameid);
id->type = IT_ETC; id->type = IT_ETC;