summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/map/mob.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index 0516295cc..12ceae907 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -962,8 +962,10 @@ int mob_spawn (struct mob_data *md)
memset(md->dmglog, 0, sizeof(md->dmglog));
md->tdmg = 0;
- if (md->lootitem)
- memset(&md->lootitem, 0, sizeof(md->lootitem));
+ if (md->lootitem) {
+ aFree(md->lootitem);
+ md->lootitem = NULL;
+ }
md->lootitem_count = 0;
if(md->db->option)