summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2019-09-23 02:04:43 +0200
committerGitHub <noreply@github.com>2019-09-23 02:04:43 +0200
commit579064db1eb50e73558dc8e81e81dd7a24f3b246 (patch)
tree48d1bb149fee8d3e4a27303d50d41d432c24fe8b /src/map/atcommand.c
parent7121899a562856863984ce90268e9af37769b346 (diff)
parent3be1dd0c728e31743c793c78ceab97b2391fb3ac (diff)
downloadhercules-579064db1eb50e73558dc8e81e81dd7a24f3b246.tar.gz
hercules-579064db1eb50e73558dc8e81e81dd7a24f3b246.tar.bz2
hercules-579064db1eb50e73558dc8e81e81dd7a24f3b246.tar.xz
hercules-579064db1eb50e73558dc8e81e81dd7a24f3b246.zip
Merge pull request #2535 from HerculesWS/itemdb_violation
Fixed several issues in itemdb_search_name function
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 968a4282a..145a5c95d 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -3559,7 +3559,7 @@ ACMD(idsearch)
safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd,77), item_name); // Search results for '%s' (name: id):
clif->message(fd, atcmd_output);
- match = itemdb->search_name_array(item_array, MAX_SEARCH, item_name, 0);
+ match = itemdb->search_name_array(item_array, MAX_SEARCH, item_name, IT_SEARCH_NAME_PARTIAL);
if (match > MAX_SEARCH) {
safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd,269), MAX_SEARCH, match);
clif->message(fd, atcmd_output);
@@ -7453,7 +7453,7 @@ ACMD(iteminfo)
return false;
}
if ((item_array[0] = itemdb->exists(atoi(message))) == NULL)
- count = itemdb->search_name_array(item_array, MAX_SEARCH, message, 0);
+ count = itemdb->search_name_array(item_array, MAX_SEARCH, message, IT_SEARCH_NAME_PARTIAL);
if (!count) {
clif->message(fd, msg_fd(fd,19)); // Invalid item ID or name.
@@ -7504,7 +7504,7 @@ ACMD(whodrops)
return false;
}
if ((item_array[0] = itemdb->exists(atoi(message))) == NULL)
- count = itemdb->search_name_array(item_array, MAX_SEARCH, message, 0);
+ count = itemdb->search_name_array(item_array, MAX_SEARCH, message, IT_SEARCH_NAME_PARTIAL);
if (!count) {
clif->message(fd, msg_fd(fd,19)); // Invalid item ID or name.