DEADSOFTWARE

Netmaster: Use DecodeIPV4 function
authorStas'M <x86corez@gmail.com>
Fri, 18 May 2018 13:25:17 +0000 (16:25 +0300)
committerStas'M <x86corez@gmail.com>
Fri, 18 May 2018 13:25:45 +0000 (16:25 +0300)
src/game/g_netmaster.pas

index 2e26b3a4911353ed68525980b511e80f984e2445..41478f1cb94b74b6c0c8ef0b4b780366cd35fc99 100644 (file)
@@ -130,16 +130,12 @@ var
   FromSL: Boolean;
 
   procedure ProcessLocal();
-  var
-    IPBuf: Array[0..19] of Byte;
   begin
     I := Length(SL);
     SetLength(SL, I + 1);
     with SL[I] do
     begin
-      FillChar(IPBuf, Length(IPBuf), 0);
-      enet_address_get_host_ip(Addr(SvAddr.host), PChar(Addr(IPBuf)), Length(IPBuf));
-      IP := PChar(Addr(IPBuf));
+      IP := DecodeIPV4(SvAddr.host);
       Port := InMsg.ReadWord();
       Ping := InMsg.ReadInt64();
       Ping := GetTimerMS() - Ping;