summaryrefslogtreecommitdiff
path: root/src/map/mob.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/mob.c')
-rw-r--r--src/map/mob.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index 9f6b6b222..d202fd41a 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -277,8 +277,7 @@ int mob_get_random_id(int type, int flag, int lv)
}
-struct mob_data *mob_once_spawn_sub(struct block_list *bl, int m,
- short x, short y, const char *mobname, int class_, const char *event)
+struct mob_data *mob_once_spawn_sub(struct block_list *bl, int m, short x, short y, const char *mobname, int class_, const char *event)
{
struct spawn_data data;
@@ -498,8 +497,8 @@ int mob_spawn_guardian(const char* mapname, short x, short y, const char* mobnam
}
data.x = x;
data.y = y;
- strncpy(data.name, mobname, NAME_LENGTH-1);
- strncpy(data.eventname, event, 50);
+ safestrncpy(data.name, mobname, sizeof(data.name));
+ safestrncpy(data.eventname, event, sizeof(data.eventname));
if (!mob_parse_dataset(&data))
return 0;