From 457f404245134d0a84d83d697111bf17fb68b0f4 Mon Sep 17 00:00:00 2001 From: ai4rei Date: Thu, 30 Dec 2010 17:23:54 +0000 Subject: * 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 --- src/map/npc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/map/npc.c') diff --git a/src/map/npc.c b/src/map/npc.c index 4b188c177..b8fd5712c 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -1183,7 +1183,7 @@ int npc_cashshop_buy(struct map_session_data *sd, int nameid, int amount, int po if( sd->state.trading ) return 4; - if( (item = itemdb_search(nameid)) == NULL ) + if( (item = itemdb_exists(nameid)) == NULL ) return 5; // Invalid Item ARR_FIND(0, nd->u.shop.count, i, nd->u.shop.shop_item[i].nameid == nameid); -- cgit v1.2.3-60-g2f50