From 5090bdf750017f0d631401edd563c452bd10ec24 Mon Sep 17 00:00:00 2001 From: MordekaiserGod Date: Sun, 9 Aug 2015 23:10:50 -0400 Subject: Corrected search order in itemdb_searchname MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It’ll now return the first result, rather than the last due to item2 being overwritten as it searches through the array. --- src/map/itemdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/map/itemdb.c b/src/map/itemdb.c index 09303978c..7de99cf7e 100644 --- a/src/map/itemdb.c +++ b/src/map/itemdb.c @@ -75,7 +75,7 @@ struct item_data* itemdb_searchname(const char *str) { return item; //Second priority to Client displayed name. - if( strcasecmp(item->jname,str) == 0 ) + if( item2 != 0 && strcasecmp(item->jname,str) == 0 ) item2 = item; } -- cgit v1.2.3-60-g2f50