summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/char/char.c4
1 files changed, 3 insertions, 1 deletions
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)