diff options
author | amber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-12-21 02:41:35 +0000 |
---|---|---|
committer | amber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-12-21 02:41:35 +0000 |
commit | e98991a2562ef1a8289e87ae306590c60cd32a66 (patch) | |
tree | 2f98ea80508df69b79537237933fb1d083bd6ece /src/char_sql | |
parent | 986541f9636b4f0375e8bce5f7f9467b3f0dda20 (diff) | |
download | hercules-e98991a2562ef1a8289e87ae306590c60cd32a66.tar.gz hercules-e98991a2562ef1a8289e87ae306590c60cd32a66.tar.bz2 hercules-e98991a2562ef1a8289e87ae306590c60cd32a66.tar.xz hercules-e98991a2562ef1a8289e87ae306590c60cd32a66.zip |
update
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@695 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char_sql')
-rw-r--r-- | src/char_sql/char.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/char_sql/char.c b/src/char_sql/char.c index 6b14b9192..47dba6f85 100644 --- a/src/char_sql/char.c +++ b/src/char_sql/char.c @@ -329,6 +329,12 @@ 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)); + memset(cp, 0, sizeof(struct mmo_charstatus)); + numdb_insert(char_db_, char_id,cp); + } + save_flag = p->char_id; printf("(\033[1;32m%d\033[0m) %s \trequest save char data - ",char_id,char_dat[0].name); |