diff options
-rw-r--r-- | Changelog.txt | 2 | ||||
-rw-r--r-- | src/char/char.c | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/Changelog.txt b/Changelog.txt index 45e664da1..3ac89c34a 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,6 +1,8 @@ Date Added 01/24 + * Fixed another compile warning in src/char/char.c + [SVN 985] [MouseJstr] * Fixed a account wipe bug in login/login.c (Thanks Wallex) [SVN 984] [MouseJstr] * Fixed a crash in char_sql/char.c where people were selecting diff --git a/src/char/char.c b/src/char/char.c index d851ea854..45eb48389 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -2559,7 +2559,9 @@ int parse_char(int fd) { else printf("Account Logged On; Account ID: %d.\n", RFIFOL(fd,2)); if (sd == NULL) { - sd = (struct char_session_data*)session[fd]->session_data = (struct char_session_data*)aCalloc(sizeof(struct char_session_data), 1); + sd = (struct char_session_data*)aCalloc(sizeof(struct char_session_data), 1); + session[fd]->session_data = sd; + memset(sd, 0, sizeof(struct char_session_data)); memcpy(sd->email, "no mail", 40); // put here a mail without '@' to refuse deletion if we don't receive the e-mail sd->connect_until_time = 0; // unknow or illimited (not displaying on map-server) |