summaryrefslogtreecommitdiff
path: root/src/char_sql/char.c
diff options
context:
space:
mode:
authoramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-27 16:29:44 +0000
committeramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-27 16:29:44 +0000
commitb14ce328eaf0c82dff32ba156ec440ff1a07ac0d (patch)
tree2da3e570dda7049d4cca85c5b43e1c02577997bc /src/char_sql/char.c
parent99b156f4ec91f2d52fd57aa1710ae9261b8db356 (diff)
downloadhercules-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/char_sql/char.c')
-rw-r--r--src/char_sql/char.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/char_sql/char.c b/src/char_sql/char.c
index 63e47a973..456fa0ac7 100644
--- a/src/char_sql/char.c
+++ b/src/char_sql/char.c
@@ -38,6 +38,7 @@
#include "itemdb.h"
#include "inter.h"
#include "db.h"
+#include "malloc.h"
#ifdef MEMWATCH
#include "memwatch.h"
@@ -266,7 +267,7 @@ void read_gm_account(void) {
}
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]);
@@ -330,7 +331,7 @@ int mmo_char_tosql(int char_id, struct mmo_charstatus *p){
cp = numdb_search(char_db_,char_id);
if (cp == NULL) {
- cp = (struct mmo_charstatus *) malloc(sizeof(struct mmo_charstatus));
+ cp = (struct mmo_charstatus *) aMalloc(sizeof(struct mmo_charstatus));
memset(cp, 0, sizeof(struct mmo_charstatus));
numdb_insert(char_db_, char_id,cp);
}
@@ -1130,7 +1131,7 @@ int mmo_char_fromsql(int char_id, struct mmo_charstatus *p, int online){
printf("char data load success]\n"); //ok. all data load successfuly!
- cp = (struct mmo_charstatus *) malloc(sizeof(struct mmo_charstatus));
+ cp = (struct mmo_charstatus *) aMalloc(sizeof(struct mmo_charstatus));
memcpy(cp, p, sizeof(struct mmo_charstatus));
numdb_insert(char_db_, char_id,cp);
@@ -2804,8 +2805,8 @@ int parse_char(int fd) {
int parse_console(char *buf) {
char *type,*command;
- type = (char *)malloc(64);
- command = (char *)malloc(64);
+ type = (char *)aMalloc(64);
+ command = (char *)aMalloc(64);
memset(type,0,64);
memset(command,0,64);