Forráskód Böngészése

Fixed compile warning

git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@985 54d463be-8e91-2dee-dedb-b68131a5f0ec
amber 20 éve
szülő
commit
fadc92aa6c
2 módosított fájl, 5 hozzáadás és 1 törlés
  1. 2 0
      Changelog.txt
  2. 3 1
      src/char/char.c

+ 2 - 0
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

+ 3 - 1
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)