summaryrefslogtreecommitdiff
path: root/src/map/pet.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/pet.c')
-rw-r--r--src/map/pet.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/map/pet.c b/src/map/pet.c
index b54f5cf6f..cf5266047 100644
--- a/src/map/pet.c
+++ b/src/map/pet.c
@@ -343,7 +343,7 @@ static int pet_return_egg(struct map_session_data *sd, struct pet_data *pd)
int flag;
pet_lootitem_drop(pd,sd);
- memset(&tmp_item,0,sizeof(tmp_item));
+ malloc_set(&tmp_item,0,sizeof(tmp_item));
tmp_item.nameid = pd->petDB->EggID;
tmp_item.identify = 1;
tmp_item.card[0] = CARD0_PET;
@@ -633,7 +633,7 @@ int pet_get_egg(int account_id,int pet_id,int flag)
return 0;
}
- memset(&tmp_item,0,sizeof(tmp_item));
+ malloc_set(&tmp_item,0,sizeof(tmp_item));
tmp_item.nameid = pet_db[i].EggID;
tmp_item.identify = 1;
tmp_item.card[0] = CARD0_PET;
@@ -761,7 +761,7 @@ static int pet_unequipitem(struct map_session_data *sd, struct pet_data *pd)
pd->pet.equip = 0;
status_set_viewdata(&pd->bl, pd->pet.class_);
clif_pet_equip(pd);
- memset(&tmp_item,0,sizeof(tmp_item));
+ malloc_set(&tmp_item,0,sizeof(tmp_item));
tmp_item.nameid = nameid;
tmp_item.identify = 1;
if((flag = pc_additem(sd,&tmp_item,1))) {
@@ -1080,7 +1080,7 @@ int pet_lootitem_drop(struct pet_data *pd,struct map_session_data *sd)
}
}
//The smart thing to do is use pd->loot->max (thanks for pointing it out, Shinomori)
- memset(pd->loot->item,0,pd->loot->max * sizeof(struct item));
+ malloc_set(pd->loot->item,0,pd->loot->max * sizeof(struct item));
pd->loot->count = 0;
pd->loot->weight = 0;
pd->ud.canact_tick = gettick()+10000; // 10*1000msの間拾わない
@@ -1278,7 +1278,7 @@ int read_petdb()
pet_db[j].script = NULL;
}
j = 0;
- memset(pet_db,0,sizeof(pet_db));
+ malloc_set(pet_db,0,sizeof(pet_db));
for(i=0;i<2;i++){
sprintf(line, "%s/%s", db_path, filename[i]);
fp=fopen(line,"r");
@@ -1354,7 +1354,7 @@ int read_petdb()
*/
int do_init_pet(void)
{
- memset(pet_db,0,sizeof(pet_db));
+ malloc_set(pet_db,0,sizeof(pet_db));
read_petdb();
item_drop_ers = ers_new((uint32)sizeof(struct item_drop));