diff options
author | ai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-05-14 10:45:27 +0000 |
---|---|---|
committer | ai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-05-14 10:45:27 +0000 |
commit | 6f305abdd5de99afd4114d9ed1d9b4df1f166980 (patch) | |
tree | 1e4069ca7f16dca899e9717e8da085547bada507 | |
parent | eda1e14f9d7de0c4123f7d823a774d818fa75148 (diff) | |
download | hercules-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
-rw-r--r-- | Changelog-Trunk.txt | 1 | ||||
-rw-r--r-- | src/map/mob.c | 6 |
2 files changed, 2 insertions, 5 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index c0289e963..a0320b86b 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -1,6 +1,7 @@ Date Added 2011/05/14 + * Removed impossible condition in mob_parse_dataset as spawn_data::eventname was/is the same size as mob_data::npc_event (since r5707). [Ai4rei] * Fixed map-server printing deprecation message, when monster event label was used as transport for special attributes (small/large monsters etc.) in script command 'monster' and related commands (bugreport:1274, since r6592, related r5707). [Ai4rei] 2011/05/13 * Random accumulated bits and pieces. [Ai4rei] 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 |