summaryrefslogtreecommitdiff
path: root/src/map/itemdb.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-07-19 21:19:12 +0300
committerAndrei Karas <akaras@inbox.ru>2018-07-19 21:53:40 +0300
commit6c73aa1b03b04d4d9a2ba9056b8583475856da12 (patch)
treea12e7ac7b7e6ae8410ba170d345a3022da0e51a5 /src/map/itemdb.c
parent07ff8c707f6077d40ca4665e14b63939d55b75cf (diff)
downloadhercules-6c73aa1b03b04d4d9a2ba9056b8583475856da12.tar.gz
hercules-6c73aa1b03b04d4d9a2ba9056b8583475856da12.tar.bz2
hercules-6c73aa1b03b04d4d9a2ba9056b8583475856da12.tar.xz
hercules-6c73aa1b03b04d4d9a2ba9056b8583475856da12.zip
Fixing detecting item id or item name in string.
Diffstat (limited to 'src/map/itemdb.c')
-rw-r--r--src/map/itemdb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index 04f25ae5b..5e447d4c0 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -873,7 +873,7 @@ static void itemdb_read_groups(void)
} else
itname = libconfig->setting_get_string_elem(itg,c - 1);
- if( itname[0] == 'I' && itname[1] == 'D' && strlen(itname) < 8 ) {
+ if (itname[0] == 'I' && itname[1] == 'D' && strlen(itname) <= 12) {
if( !( data = itemdb->exists(atoi(itname+2)) ) )
ShowWarning("itemdb_read_groups: unknown item ID '%d' in group '%s'!\n",atoi(itname+2),config_setting_name(itg));
} else if( !( data = itemdb->name2id(itname) ) )
@@ -1240,7 +1240,7 @@ static void itemdb_read_packages(void)
itname = config_setting_name(it);
- if( itname[0] == 'I' && itname[1] == 'D' && strlen(itname) < 8 ) {
+ if (itname[0] == 'I' && itname[1] == 'D' && strlen(itname) <= 12) {
if( !( data = itemdb->exists(atoi(itname+2)) ) )
ShowWarning("itemdb_read_packages: unknown item ID '%d' in package '%s'!\n",atoi(itname+2),config_setting_name(itg));
} else if( !( data = itemdb->name2id(itname) ) )
@@ -1491,7 +1491,7 @@ static void itemdb_read_chains(void)
while( (entry = libconfig->setting_get_elem(itc,c++)) ) {
const char *itname = config_setting_name(entry);
- if( itname[0] == 'I' && itname[1] == 'D' && strlen(itname) < 8 ) {
+ if (itname[0] == 'I' && itname[1] == 'D' && strlen(itname) <= 12) {
if( !( data = itemdb->exists(atoi(itname+2)) ) )
ShowWarning("itemdb_read_chains: unknown item ID '%d' in chain '%s'!\n",atoi(itname+2),name);
} else if( !( data = itemdb->name2id(itname) ) )