summaryrefslogtreecommitdiff
path: root/src/map/mob.c
diff options
context:
space:
mode:
authorai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-05-14 10:45:27 +0000
committerai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-05-14 10:45:27 +0000
commit6f305abdd5de99afd4114d9ed1d9b4df1f166980 (patch)
tree1e4069ca7f16dca899e9717e8da085547bada507 /src/map/mob.c
parenteda1e14f9d7de0c4123f7d823a774d818fa75148 (diff)
downloadhercules-6f305abdd5de99afd4114d9ed1d9b4df1f166980.tar.gz
hercules-6f305abdd5de99afd4114d9ed1d9b4df1f166980.tar.bz2
hercules-6f305abdd5de99afd4114d9ed1d9b4df1f166980.tar.xz
hercules-6f305abdd5de99afd4114d9ed1d9b4df1f166980.zip
* Removed impossible condition in mob_parse_dataset as spawn_data::eventname was/is the same size as mob_data::npc_event (since r5707).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14816 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mob.c')
-rw-r--r--src/map/mob.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index 73fdaa369..ccb4ab923 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -173,10 +173,6 @@ int mob_parse_dataset(struct spawn_data *data)
if ((!mobdb_checkid(data->class_) && !mob_is_clone(data->class_)) || !data->num)
return 0;
- //better safe than sorry, current md->npc_event has a size of 50
- if ((i=strlen(data->eventname)) >= 50)
- return 0;
-
if (data->eventname[0])
{
if(npc_event_isspecial(data->eventname))
@@ -191,7 +187,7 @@ int mob_parse_dataset(struct spawn_data *data)
data->state.ai=1;
data->eventname[0] = '\0'; //Clear event as it is not used.
}
- } else if( i ) {
+ } else if( ( i = strlen(data->eventname) ) > 0 ) {
if (data->eventname[i-1] == '"')
data->eventname[i-1] = '\0'; //Remove trailing quote.
if (data->eventname[0] == '"') //Strip leading quotes