diff options
author | amber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-12-27 16:29:44 +0000 |
---|---|---|
committer | amber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-12-27 16:29:44 +0000 |
commit | b14ce328eaf0c82dff32ba156ec440ff1a07ac0d (patch) | |
tree | 2da3e570dda7049d4cca85c5b43e1c02577997bc /src/map/pc.c | |
parent | 99b156f4ec91f2d52fd57aa1710ae9261b8db356 (diff) | |
download | hercules-b14ce328eaf0c82dff32ba156ec440ff1a07ac0d.tar.gz hercules-b14ce328eaf0c82dff32ba156ec440ff1a07ac0d.tar.bz2 hercules-b14ce328eaf0c82dff32ba156ec440ff1a07ac0d.tar.xz hercules-b14ce328eaf0c82dff32ba156ec440ff1a07ac0d.zip |
update
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@821 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index ccf163f4e..f7837f838 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -126,7 +126,7 @@ int pc_set_gm_level(int account_id, int level) { } GM_num++; - gm_account = realloc(gm_account, sizeof(struct gm_account) * GM_num); + gm_account = aRealloc(gm_account, sizeof(struct gm_account) * GM_num); gm_account[GM_num - 1].account_id = account_id; gm_account[GM_num - 1].level = level; return 0; @@ -6430,7 +6430,7 @@ int pc_setreg(struct map_session_data *sd,int reg,int val) } } sd->reg_num++; - sd->reg = realloc(sd->reg, sizeof(*(sd->reg)) * sd->reg_num); + sd->reg = aRealloc(sd->reg, sizeof(*(sd->reg)) * sd->reg_num); if (sd->reg == NULL){ printf("out of memory : pc_setreg\n"); exit(1); @@ -6481,7 +6481,7 @@ int pc_setregstr(struct map_session_data *sd,int reg,char *str) return 0; } sd->regstr_num++; - sd->regstr = realloc(sd->regstr, sizeof(sd->regstr[0]) * sd->regstr_num); + sd->regstr = aRealloc(sd->regstr, sizeof(sd->regstr[0]) * sd->regstr_num); if(sd->regstr==NULL){ printf("out of memory : pc_setreg\n"); exit(1); @@ -7750,7 +7750,7 @@ int pc_read_gm_account(int fd) free(gm_account); GM_num = 0; #ifdef TXT_ONLY - gm_account = calloc(sizeof(struct gm_account) * ((RFIFOW(fd,2) - 4) / 5), 1); + gm_account = aCalloc(sizeof(struct gm_account) * ((RFIFOW(fd,2) - 4) / 5), 1); for (i = 4; i < RFIFOW(fd,2); i = i + 5) { gm_account[GM_num].account_id = RFIFOL(fd,i); gm_account[GM_num].level = (int)RFIFOB(fd,i+4); @@ -7764,7 +7764,7 @@ int pc_read_gm_account(int fd) } lsql_res = mysql_store_result(&lmysql_handle); if (lsql_res) { - gm_account = calloc(sizeof(struct gm_account) * mysql_num_rows(lsql_res), 1); + gm_account = aCalloc(sizeof(struct gm_account) * mysql_num_rows(lsql_res), 1); while ((lsql_row = mysql_fetch_row(lsql_res))) { gm_account[GM_num].account_id = atoi(lsql_row[0]); gm_account[GM_num].level = atoi(lsql_row[1]); |