Browse Source

Use unsigned local variable NetAddrToStr to avoid range check error

Pierre Muller 3 months ago
parent
commit
6d22408256
1 changed files with 2 additions and 2 deletions
  1. 2 2
      packages/rtl-extra/src/inc/sockets.inc

+ 2 - 2
packages/rtl-extra/src/inc/sockets.inc

@@ -278,8 +278,8 @@ Type array4int = array[1..4] of byte;
 function NetAddrToStr (Entry : in_addr) : AnsiString;
 
 Var Dummy : Ansistring;
-    i,j   : Longint;
-
+    i   : Longint;
+    j   : Cardinal;
 begin
   NetAddrToStr:='';
   j:=entry.s_addr;