From 352cf002b26013f79d16d2d3afa2ab8d3f5eb0d9 Mon Sep 17 00:00:00 2001 From: darkvater Date: Thu, 13 Jan 2005 20:46:39 +0000 Subject: [PATCH] (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 | 2 +- network_gui.c | 6 ++++-- player_gui.c | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/main_gui.c b/main_gui.c index 023a645a30..783762b437 100644 --- a/main_gui.c +++ b/main_gui.c @@ -251,7 +251,7 @@ static void MenuClickFinances(int index) } #ifdef ENABLE_NETWORK -extern void ShowClientList(); +extern void ShowClientList(void); #endif /* ENABLE_NETWORK */ static void MenuClickCompany(int index) diff --git a/network_gui.c b/network_gui.c index 5a3b39eb75..fabb9f733d 100644 --- a/network_gui.c +++ b/network_gui.c @@ -1255,9 +1255,11 @@ static void ClientListWndProc(Window *w, WindowEvent *e) } } -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); diff --git a/player_gui.c b/player_gui.c index da4e2eaa58..bb5606c95b 100644 --- a/player_gui.c +++ b/player_gui.c @@ -163,7 +163,7 @@ static void PlayerFinancesWndProc(Window *w, WindowEvent *e) 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 */