(svn r1502) -Fix: [1101889] Crash under windows... stupid typo in player_gui.c ^ should've been &
authordarkvater
Thu, 13 Jan 2005 20:46:39 +0000
changeset 1003 5a1516385ad5
parent 1002 9d83f1842257
child 1004 dcc3c5747e22
(svn r1502) -Fix: [1101889] Crash under windows... stupid typo in player_gui.c ^ should've been &
-Fix: in multiplayer clientlist can only be opened once
main_gui.c
network_gui.c
player_gui.c
--- a/main_gui.c	Thu Jan 13 17:23:24 2005 +0000
+++ b/main_gui.c	Thu Jan 13 20:46:39 2005 +0000
@@ -251,7 +251,7 @@
 }
 
 #ifdef ENABLE_NETWORK
-extern void ShowClientList();
+extern void ShowClientList(void);
 #endif /* ENABLE_NETWORK */
 
 static void MenuClickCompany(int index)
--- a/network_gui.c	Thu Jan 13 17:23:24 2005 +0000
+++ b/network_gui.c	Thu Jan 13 20:46:39 2005 +0000
@@ -1255,9 +1255,11 @@
 	}
 }
 
-void ShowClientList()
+void ShowClientList(void)
 {
-	AllocateWindowDesc(&_client_list_desc);
+	Window *w = AllocateWindowDescFront(&_client_list_desc, 0);
+	if (w)
+		w->window_number = 0;
 }
 
 extern void SwitchMode(int new_mode);
--- a/player_gui.c	Thu Jan 13 17:23:24 2005 +0000
+++ b/player_gui.c	Thu Jan 13 20:46:39 2005 +0000
@@ -163,7 +163,7 @@
 			bool stickied = !!(w->flags4 & WF_STICKY);
 			int player = w->window_number;
 			DeleteWindow(w);
-			DoShowPlayerFinances(player, mode^1, stickied);
+			DoShowPlayerFinances(player, !HASBIT(mode, 0), stickied);
 		} break;
 
 		case 6: /* increase loan */