summaryrefslogtreecommitdiff
path: root/src/char
diff options
context:
space:
mode:
authorvalaris <valaris@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-11-20 16:39:27 +0000
committervalaris <valaris@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-11-20 16:39:27 +0000
commit48d9f7d2df2e06f6f272ba8d7e7459256429a0dd (patch)
tree6525febc9d3c4dd6743abdf3a1a3d9e53ada564d /src/char
parent2630f7d1fa82ff5a129efca35094da6b79a53fd0 (diff)
downloadhercules-48d9f7d2df2e06f6f272ba8d7e7459256429a0dd.tar.gz
hercules-48d9f7d2df2e06f6f272ba8d7e7459256429a0dd.tar.bz2
hercules-48d9f7d2df2e06f6f272ba8d7e7459256429a0dd.tar.xz
hercules-48d9f7d2df2e06f6f272ba8d7e7459256429a0dd.zip
* Fixed crash with upgrading TXT and having more than 256 accounts. [Valaris]
* TXT upgrades will convert broken flag to attribute column. [Valaris] git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/athena@271 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char')
-rw-r--r--src/char/char.c6
-rw-r--r--src/char/int_storage.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/char/char.c b/src/char/char.c
index 65dc56de2..c463e64c4 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -479,7 +479,7 @@ int mmo_char_fromstr(char *str, struct mmo_charstatus *p) {
if (sscanf(str + next, "%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d%n",
&tmp_int[0], &tmp_int[1], &tmp_int[2], &tmp_int[3],
&tmp_int[4], &tmp_int[5], &tmp_int[6],
- &tmp_int[7], &tmp_int[8], &tmp_int[9], &tmp_int[10], &tmp_int[11], &len) == 12) {
+ &tmp_int[7], &tmp_int[8], &tmp_int[9], &tmp_int[10], &tmp_int[10], &len) == 12) {
// do nothing, it's ok
} else if (sscanf(str + next, "%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d%n",
&tmp_int[0], &tmp_int[1], &tmp_int[2], &tmp_int[3],
@@ -509,7 +509,7 @@ int mmo_char_fromstr(char *str, struct mmo_charstatus *p) {
if (sscanf(str + next, "%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d%n",
&tmp_int[0], &tmp_int[1], &tmp_int[2], &tmp_int[3],
&tmp_int[4], &tmp_int[5], &tmp_int[6],
- &tmp_int[7], &tmp_int[8], &tmp_int[9], &tmp_int[10], &tmp_int[11], &len) == 12) {
+ &tmp_int[7], &tmp_int[8], &tmp_int[9], &tmp_int[10], &tmp_int[10], &len) == 12) {
// do nothing, it's ok
} else if (sscanf(str + next, "%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d%n",
&tmp_int[0], &tmp_int[1], &tmp_int[2], &tmp_int[3],
@@ -685,7 +685,7 @@ int mmo_char_init(void) {
char_log("Out of memory: mmo_char_init (realloc of char_dat)." RETCODE);
exit(1);
}
- online_chars = realloc(online_chars, sizeof(int) * char_max);
+ online_chars = realloc(online_chars, sizeof(struct online_chars) * char_max);
if (!online_chars) {
printf("Out of memory: mmo_char_init (realloc of online_chars).\n");
char_log("Out of memory: mmo_char_init (realloc of online_chars)." RETCODE);
diff --git a/src/char/int_storage.c b/src/char/int_storage.c
index de0e7058f..7a4022a55 100644
--- a/src/char/int_storage.c
+++ b/src/char/int_storage.c
@@ -62,7 +62,7 @@ int storage_fromstr(char *str,struct storage *p)
if(sscanf(str + next, "%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d%n",
&tmp_int[0], &tmp_int[1], &tmp_int[2], &tmp_int[3],
&tmp_int[4], &tmp_int[5], &tmp_int[6],
- &tmp_int[7], &tmp_int[8], &tmp_int[9], &tmp_int[10], &tmp_int[11], &len) == 12) {
+ &tmp_int[7], &tmp_int[8], &tmp_int[9], &tmp_int[10], &tmp_int[10], &len) == 12) {
p->storage[i].id = tmp_int[0];
p->storage[i].nameid = tmp_int[1];
p->storage[i].amount = tmp_int[2];
@@ -144,7 +144,7 @@ int guild_storage_fromstr(char *str,struct guild_storage *p)
if(sscanf(str + next, "%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d%n",
&tmp_int[0], &tmp_int[1], &tmp_int[2], &tmp_int[3],
&tmp_int[4], &tmp_int[5], &tmp_int[6],
- &tmp_int[7], &tmp_int[8], &tmp_int[9], &tmp_int[10], &tmp_int[11], &len) == 12) {
+ &tmp_int[7], &tmp_int[8], &tmp_int[9], &tmp_int[10], &tmp_int[10], &len) == 12) {
p->storage[i].id = tmp_int[0];
p->storage[i].nameid = tmp_int[1];
p->storage[i].amount = tmp_int[2];