summaryrefslogtreecommitdiff
path: root/src/map/itemdb.c
diff options
context:
space:
mode:
authorMordekaiserGod <mordekaiser@iwillgetaproperemail.com>2015-08-09 23:10:50 -0400
committerMordekaiserGod <mordekaiser@iwillgetaproperemail.com>2015-08-09 23:10:50 -0400
commit5090bdf750017f0d631401edd563c452bd10ec24 (patch)
treec01ce4e413313ce0fdf4c36468306568b0754219 /src/map/itemdb.c
parent62a7e575b45d7955c5100961e3610975857ce81d (diff)
downloadhercules-5090bdf750017f0d631401edd563c452bd10ec24.tar.gz
hercules-5090bdf750017f0d631401edd563c452bd10ec24.tar.bz2
hercules-5090bdf750017f0d631401edd563c452bd10ec24.tar.xz
hercules-5090bdf750017f0d631401edd563c452bd10ec24.zip
Corrected search order in itemdb_searchname
It’ll now return the first result, rather than the last due to item2 being overwritten as it searches through the array.
Diffstat (limited to 'src/map/itemdb.c')
-rw-r--r--src/map/itemdb.c2
1 files changed, 1 insertions, 1 deletions
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;
}