소스 검색

* Fixed lack of initialization in chrif_authreq causing crashes in chrif_authok.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6420 54d463be-8e91-2dee-dedb-b68131a5f0ec
Lance 19 년 전
부모
커밋
7acd437879
2개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 0
      Changelog-Trunk.txt
  2. 2 2
      src/map/chrif.c

+ 1 - 0
Changelog-Trunk.txt

@@ -4,6 +4,7 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
 2006/04/30
+	* Fixed lack of initialization in chrif_authreq causing crashes in chrif_authok. [Lance] 
 	* Fixed a logic error that was likely the cause of pet loot drops not
 	  working. [Skotlex]
 	* If someone is expulsed from a guild while the guild storage is open, it

+ 2 - 2
src/map/chrif.c

@@ -465,13 +465,13 @@ void chrif_authreq(struct map_session_data *sd)
 			aFree(auth_data->char_dat);
 		idb_remove(auth_db, sd->bl.id);
 	} else { //data from char server has not arrived yet.
-		auth_data = aMalloc(sizeof(struct auth_node));
+		auth_data = aCalloc(1,sizeof(struct auth_node));
 		auth_data->sd = sd;
 		auth_data->fd = sd->fd;
 		auth_data->account_id = sd->bl.id;
 		auth_data->login_id1 = sd->login_id1;
 		auth_data->node_created = gettick();
-		idb_put(auth_db, sd->bl.id, auth_data);
+		uidb_put(auth_db, sd->bl.id, auth_data);
 	}
 	return;
 }