- itemdb_exists and itemdb_searchname should now ignore dummy_item matches.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5755 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
skotlex 2006-03-26 05:59:25 +00:00
parent 352f81eb40
commit a387f9ba5f
2 changed files with 5 additions and 1 deletions

View File

@ -6,6 +6,7 @@ GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALAR
2006/03/26 2006/03/26
* itemdb_exists and itemdb_searchname should now ignore dummy_item matches. [Skotlex]
* Fixed jstrescapecpy crashing when you pass a null string to parse. [Skotlex] * Fixed jstrescapecpy crashing when you pass a null string to parse. [Skotlex]
2006/03/25 2006/03/25
* Fixed the map-server freeze/crash on Warp Portal. [Skotlex] * Fixed the map-server freeze/crash on Warp Portal. [Skotlex]

View File

@ -42,6 +42,7 @@ int itemdb_searchname_sub(DBKey key,void *data,va_list ap)
char *str; char *str;
str=va_arg(ap,char *); str=va_arg(ap,char *);
dst=va_arg(ap,struct item_data **); dst=va_arg(ap,struct item_data **);
if(item == dummy_item) return 0;
if( strcmpi(item->name,str)==0 ) //by lupus if( strcmpi(item->name,str)==0 ) //by lupus
*dst=item; *dst=item;
return 0; return 0;
@ -183,7 +184,9 @@ int itemdb_searchrandomgroup (int groupid)
*/ */
struct item_data* itemdb_exists(int nameid) struct item_data* itemdb_exists(int nameid)
{ {
return idb_get(item_db,nameid); struct item_data* id = idb_get(item_db,nameid);
if (id == dummy_item) return NULL;
return id;
} }
/*========================================== /*==========================================