Просмотр исходного кода

Cleanup

git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@800 54d463be-8e91-2dee-dedb-b68131a5f0ec
amber 20 лет назад
Родитель
Сommit
f2f5ab96fc
3 измененных файлов с 6 добавлено и 2 удалено
  1. 3 0
      Changelog.txt
  2. 2 1
      src/map/clif.c
  3. 1 1
      src/map/itemdb.c

+ 3 - 0
Changelog.txt

@@ -1,5 +1,8 @@
 Date	Added
 12/26
+	* Fixed a crash that resulted when disconnecting (SVN 800)
+	  the new client when the old client is still connected [MouseJstr]
+	* Fixed some gcc 2.95 compile errors [MouseJstr]
 	* Fixed some array bounds errors (SVN 799) [MouseJstr]
 	* @mapexit (and do_final) now persist all data to the
 	  char server before exiting to eliminate storage/inventory

+ 2 - 1
src/map/clif.c

@@ -7272,7 +7272,8 @@ void clif_parse_WantToConnection(int fd, struct map_session_data *sd)
 	if ((old_sd = map_id2sd(account_id)) != NULL) {
 		clif_authfail_fd(fd, 8); // still recognizes last connection
 		clif_authfail_fd(old_sd->fd, 2); // same id
-		clif_setwaitclose(sd->fd); // Set session to EOF
+		if (sd != 0)
+			clif_setwaitclose(sd->fd); // Set session to EOF
 	} else {
 		sd = session[fd]->session_data = (struct map_session_data*)aCalloc(1, sizeof(struct map_session_data));
 		sd->fd = fd;

+ 1 - 1
src/map/itemdb.c

@@ -592,8 +592,8 @@ static int itemdb_read_itemslottable(void)
 	buf[s]=0;
 	for(p=buf;p-buf<s;){
 		int nameid,equip;
-		sscanf(p,"%d#%d#",&nameid,&equip);
 		struct item_data* item = itemdb_search(nameid);
+		sscanf(p,"%d#%d#",&nameid,&equip);
 		if (item && itemdb_isequip2(item))
 			item->equip=equip;
 		p=strchr(p,10);