summaryrefslogtreecommitdiff
path: root/src/map/map.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/map.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/map.c')
-rw-r--r--src/map/map.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/map.c b/src/map/map.c
index 3979ea90e..8ea059700 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -5461,7 +5461,7 @@ static int map_zone_str2itemid(const char *name)
if( !name )
return 0;
- if( name[0] == 'I' && name[1] == 'D' && strlen(name) < 8 ) {
+ if (name[0] == 'I' && name[1] == 'D' && strlen(name) <= 12) {
if( !( data = itemdb->exists(atoi(name+2))) ) {
return 0;
}
@@ -5479,7 +5479,7 @@ static unsigned short map_zone_str2skillid(const char *name)
if( !name )
return 0;
- if( name[0] == 'I' && name[1] == 'D' && strlen(name) < 8 ) {
+ if (name[0] == 'I' && name[1] == 'D' && strlen(name) <= 12) {
if( !skill->get_index((nameid = atoi(name+2))) )
return 0;
} else {