summaryrefslogtreecommitdiff
path: root/src/map/itemdb.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-07 18:32:28 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-07 18:32:28 +0000
commit6ef0cea83969e0b00e33721e956bc0583e3715eb (patch)
tree85e8c54435fff8be65d047f065a0b22374e5aa83 /src/map/itemdb.c
parent1e1fee4e8e3c9cc5636afcbeeacd9e833a9aecd7 (diff)
downloadhercules-6ef0cea83969e0b00e33721e956bc0583e3715eb.tar.gz
hercules-6ef0cea83969e0b00e33721e956bc0583e3715eb.tar.bz2
hercules-6ef0cea83969e0b00e33721e956bc0583e3715eb.tar.xz
hercules-6ef0cea83969e0b00e33721e956bc0583e3715eb.zip
- itemdb_exists will now return NULL for item_id 0.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7572 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/itemdb.c')
-rw-r--r--src/map/itemdb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index 669324532..c535b8674 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -134,7 +134,9 @@ int itemdb_group (int nameid)
*/
struct item_data* itemdb_exists(int nameid)
{
- struct item_data* id = idb_get(item_db,nameid);
+ struct item_data* id;
+ if (!nameid) return NULL;
+ id = idb_get(item_db,nameid);
// if (id == &dummy_item) return NULL; //Let dummy items go through... technically they "exist" because someone already has them...
return id;
}