(svn r1012) -Fix: [Network] Endless loop if a server was offline (WizKid)
authortruelight
Fri, 10 Dec 2004 22:01:17 +0000
changeset 591 dd8f0291652b
parent 590 1033437d21ef
child 592 241ec8dd4250
(svn r1012) -Fix: [Network] Endless loop if a server was offline (WizKid)
network_gui.c
--- a/network_gui.c	Fri Dec 10 20:22:24 2004 +0000
+++ b/network_gui.c	Fri Dec 10 22:01:17 2004 +0000
@@ -123,22 +123,22 @@
 				DrawString(135, y, STR_NETWORK_CLIENTS_ONLINE, 2);
 
 				// only draw icons if the server is online
-				if(cur_item->online) {
+				if (cur_item->online) {
 
 					// draw a lock if the server is password protected.
 					if(cur_item->info.use_password)
 						DrawSprite(SPR_LOCK, 186, y-1);
-	
+
 					// draw red or green icon, depending on compatibility with server.
 					DrawSprite(SPR_BLOT | (compatible?0x30d8000:0x30b8000), 195, y);
-	
+
 					// draw flag according to server language
 					DrawSprite(SPR_FLAGS_BASE + cur_item->info.server_lang, 206, y);
-	
-					cur_item = cur_item->next;
-					y += NET_PRC__SIZE_OF_ROW;
-					if (++n == w->vscroll.cap) { break;} // max number of games in the window
 				}
+
+				cur_item = cur_item->next;
+				y += NET_PRC__SIZE_OF_ROW;
+				if (++n == w->vscroll.cap) { break;} // max number of games in the window
 			}
 		}