summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-07-09 20:47:06 -0300
committershennetsind <ind@henn.et>2013-07-09 20:47:06 -0300
commit610b7cec30903bac4ba734c6627b450390dad905 (patch)
tree26568c09510316d4f1b9ffabaa4af8aaa91ed805 /src/map
parentb08910e828bd6f2029f2434572d8f84b30eb7d9c (diff)
downloadhercules-610b7cec30903bac4ba734c6627b450390dad905.tar.gz
hercules-610b7cec30903bac4ba734c6627b450390dad905.tar.bz2
hercules-610b7cec30903bac4ba734c6627b450390dad905.tar.xz
hercules-610b7cec30903bac4ba734c6627b450390dad905.zip
Fixed Bug #7497
Special Thanks to shenhuyong, kyeme. http://hercules.ws/board/tracker/issue-7497-iditem-idq/ Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map')
-rw-r--r--src/map/itemdb.c6
-rw-r--r--src/map/map.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index e703ead68..036075e57 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -684,7 +684,7 @@ void itemdb_read_groups(void) {
} else
itname = config_setting_get_string_elem(itg,c - 1);
- if( itname[0] == 'I' && itname[1] == 'D' && strlen(itname) < 7 ) {
+ if( itname[0] == 'I' && itname[1] == 'D' && strlen(itname) < 8 ) {
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) ) )
@@ -1036,7 +1036,7 @@ void itemdb_read_packages(void) {
itname = config_setting_name(it);
- if( itname[0] == 'I' && itname[1] == 'D' && strlen(itname) < 7 ) {
+ if( itname[0] == 'I' && itname[1] == 'D' && strlen(itname) < 8 ) {
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) ) )
@@ -1162,7 +1162,7 @@ void itemdb_read_chains(void) {
while( (entry = config_setting_get_elem(itc,c++)) ) {
const char *itname = config_setting_name(entry);
- if( itname[0] == 'I' && itname[1] == 'D' && strlen(itname) < 7 ) {
+ if( itname[0] == 'I' && itname[1] == 'D' && strlen(itname) < 8 ) {
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) ) )
diff --git a/src/map/map.c b/src/map/map.c
index 68ac650c7..05ba2edc2 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -4452,7 +4452,7 @@ unsigned short map_zone_str2itemid(const char *name) {
if( !name )
return 0;
- if( name[0] == 'I' && name[1] == 'D' && strlen(name) <= 7 ) {
+ if( name[0] == 'I' && name[1] == 'D' && strlen(name) < 8 ) {
if( !( data = itemdb->exists(atoi(name+2))) ) {
return 0;
}
@@ -4469,7 +4469,7 @@ unsigned short map_zone_str2skillid(const char *name) {
if( !name )
return 0;
- if( name[0] == 'I' && name[1] == 'D' && strlen(name) <= 7 ) {
+ if( name[0] == 'I' && name[1] == 'D' && strlen(name) < 8 ) {
if( !skill->get_index((nameid = atoi(name+2))) )
return 0;
} else {