Jelajahi Sumber

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
shennetsind 13 tahun lalu
induk
melakukan
594f5c0873
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      src/map/itemdb.c

+ 1 - 1
src/map/itemdb.c

@@ -764,7 +764,7 @@ static bool itemdb_parse_dbrow(char** str, const char* source, int line, int scr
 
 	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
 		ShowWarning("itemdb_parse_dbrow: Invalid item type %d for item %d. IT_ETC will be used.\n", id->type, nameid);
 		id->type = IT_ETC;