summaryrefslogtreecommitdiff
path: root/src/map/party.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/party.c')
-rw-r--r--src/map/party.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/map/party.c b/src/map/party.c
index 650b8b7c2..10ab78e5b 100644
--- a/src/map/party.c
+++ b/src/map/party.c
@@ -194,7 +194,7 @@ static void* create_party(DBKey key, va_list args) {
static void party_check_state(struct party_data *p)
{
int i;
- memset(&p->state, 0, sizeof(p->state));
+ malloc_set(&p->state, 0, sizeof(p->state));
for (i = 0; i < MAX_PARTY; i ++)
{
if (!p->party.member[i].online) continue; //Those not online shouldn't aport to skill usage and all that.
@@ -230,8 +230,8 @@ int party_recv_info(struct party *sp)
if (!p->party.party_id) //party just received.
party_check_member(sp);
memcpy(&p->party,sp,sizeof(struct party));
- memset(&p->state, 0, sizeof(p->state));
- memset(&p->data, 0, sizeof(p->data));
+ malloc_set(&p->state, 0, sizeof(p->state));
+ malloc_set(&p->data, 0, sizeof(p->data));
for(i=0;i<MAX_PARTY;i++){
if (!p->party.member[i].account_id)
continue;
@@ -416,8 +416,8 @@ int party_member_leaved(int party_id,int account_id,int char_id)
if(p->party.member[i].account_id==account_id &&
p->party.member[i].char_id==char_id){
clif_party_leaved(p,sd,account_id,p->party.member[i].name,0x00);
- memset(&p->party.member[i], 0, sizeof(p->party.member[0]));
- memset(&p->data[i], 0, sizeof(p->data[0]));
+ malloc_set(&p->party.member[i], 0, sizeof(p->party.member[0]));
+ malloc_set(&p->data[i], 0, sizeof(p->data[0]));
p->party.count--;
party_check_state(p);
break;
@@ -566,7 +566,7 @@ int party_send_logout(struct map_session_data *sd)
for(i=0;i<MAX_PARTY && p->data[i].sd != sd;i++);
if (i < MAX_PARTY)
- memset(&p->data[i], 0, sizeof(p->data[0]));
+ malloc_set(&p->data[i], 0, sizeof(p->data[0]));
return 1;
}