diff options
-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 |