summaryrefslogtreecommitdiff
path: root/src/map/storage.c
diff options
context:
space:
mode:
authorai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-12-30 17:23:54 +0000
committerai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-12-30 17:23:54 +0000
commit457f404245134d0a84d83d697111bf17fb68b0f4 (patch)
tree0ceaa9b19fba1c05ddb6e3e01c6efaf68879c3a4 /src/map/storage.c
parent10b223a4bfb9c60bb8bc86f18feb69b7313d854b (diff)
downloadhercules-457f404245134d0a84d83d697111bf17fb68b0f4.tar.gz
hercules-457f404245134d0a84d83d697111bf17fb68b0f4.tar.bz2
hercules-457f404245134d0a84d83d697111bf17fb68b0f4.tar.xz
hercules-457f404245134d0a84d83d697111bf17fb68b0f4.zip
* Fixed improper use of itemdb_search. It does not return NULL but a dummy item, if the item id is invalid.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14642 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/storage.c')
-rw-r--r--src/map/storage.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/map/storage.c b/src/map/storage.c
index eb64d3eb4..4eb1beb32 100644
--- a/src/map/storage.c
+++ b/src/map/storage.c
@@ -393,11 +393,12 @@ int guild_storage_additem(struct map_session_data* sd, struct guild_storage* sto
nullpo_retr(1, sd);
nullpo_retr(1, stor);
nullpo_retr(1, item_data);
- nullpo_retr(1, data = itemdb_search(item_data->nameid));
if(item_data->nameid <= 0 || amount <= 0)
return 1;
+ data = itemdb_search(item_data->nameid);
+
if( !itemdb_canguildstore(item_data, pc_isGM(sd)) || item_data->expire_time )
{ //Check if item is storable. [Skotlex]
clif_displaymessage (sd->fd, msg_txt(264));