DEADSOFTWARE

fixed two compiler warnings (one is definitely false positive, but meh...)
authorKetmar Dark <ketmar@ketmar.no-ip.org>
Sat, 15 Sep 2018 21:42:57 +0000 (00:42 +0300)
committerKetmar Dark <ketmar@ketmar.no-ip.org>
Sat, 15 Sep 2018 21:43:34 +0000 (00:43 +0300)
src/game/g_game.pas
src/game/g_netmaster.pas

index 7f6fa0a5d83573ffd3462fe9be1edf24b3bde545..fec21e4be187f1ca06641aa67e0916dd5c9f5197 100644 (file)
@@ -1478,6 +1478,7 @@ function GetRandomSpectMode(Current: Byte): Byte;
 label
   retry;
 begin
+  Result := Current;
 retry:
   case Random(7) of
     0: Result := SPECT_STATS;
index 58667c978f15f1690d978e9c27d2993d279ca7df..4137d8b012ef6d22793b06fe1ecf48fd4bf14c8a 100644 (file)
@@ -476,6 +476,20 @@ end;
 
 function GetServerFromTable(Index: Integer; SL: TNetServerList; ST: TNetServerTable): TNetServer;
 begin
+  Result.Number := 0;
+  Result.Protocol := 0;
+  Result.Name := '';
+  Result.IP := '';
+  Result.Port := 0;
+  Result.Map := '';
+  Result.Players := 0;
+  Result.MaxPlayers := 0;
+  Result.LocalPl := 0;
+  Result.Bots := 0;
+  Result.Ping := 0;
+  Result.GameMode := 0;
+  Result.Password := false;
+  FillChar(Result.PingAddr, SizeOf(ENetAddress), 0);
   if ST = nil then
     Exit;
   if (Index < 0) or (Index >= Length(ST)) then