Browse Source

* Use unsigned for ip6 parts

git-svn-id: trunk@45393 -
michael 5 years ago
parent
commit
14a6768497
1 changed files with 6 additions and 6 deletions
  1. 6 6
      packages/rtl-extra/src/inc/sockets.inc

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

@@ -583,10 +583,10 @@ var
 
 
 begin
 begin
   TryStrToHostAddr6 := False;
   TryStrToHostAddr6 := False;
-  ip6.s6_addr32[0] := 0;
-  ip6.s6_addr32[1] := 0;
-  ip6.s6_addr32[2] := 0;
-  ip6.s6_addr32[3] := 0;
+  ip6.u6_addr32[0] := 0;
+  ip6.u6_addr32[1] := 0;
+  ip6.u6_addr32[2] := 0;
+  ip6.u6_addr32[3] := 0;
 
 
   if (Length(IP) > 45) or (Length(IP) < 2) then exit;
   if (Length(IP) > 45) or (Length(IP) < 2) then exit;
 
 
@@ -711,7 +711,7 @@ begin
   if coll_zero_seen then
   if coll_zero_seen then
   begin
   begin
     for tmpByte := 0 to coll_start_idx do
     for tmpByte := 0 to coll_start_idx do
-      ip6.s6_addr16[tmpByte] := hextet_arr[tmpByte];
+      ip6.u6_addr16[tmpByte] := hextet_arr[tmpByte];
 
 
     // hextet_idx-1 points to the final byte we processed, in the hextet_arr
     // hextet_idx-1 points to the final byte we processed, in the hextet_arr
     // array. starting there, reading back to coll_start_idx, we copy these
     // array. starting there, reading back to coll_start_idx, we copy these
@@ -723,7 +723,7 @@ begin
     idx := 7;
     idx := 7;
     while tmpByte > coll_start_idx do
     while tmpByte > coll_start_idx do
     begin
     begin
-      ip6.s6_addr16[idx] := hextet_arr[tmpByte];
+      ip6.u6_addr16[idx] := hextet_arr[tmpByte];
       Dec(tmpByte);
       Dec(tmpByte);
       Dec(idx);
       Dec(idx);
     end;
     end;