File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed
Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change 7272Implementation
7373
7474Uses
75- process, StrUtils;
75+ process, StrUtils
76+ { $IFDEF Windows}
77+ , math
78+ { $ENDIF}
79+ ;
7680
7781Function StrToIPAddress (Value : String): TIPAddress;
7882Var
157161 // If netmask is in hex format (0x...), we could convert it, but for now just store as is
158162 // Most common: 0xffffff00 = 255.255.255.0
159163 result[high(result)].SubnetMask := tmp;
160- End Else Begin
164+ End
165+ Else Begin
161166 result[high(result)].SubnetMask := ' 255.255.255.0' ; // Default fallback
162167 End ;
163168
167172 If pos(' :' , tmp) <> 0 Then Begin
168173 tmp := copy(tmp, 1 , pos(' :' , tmp) - 1 );
169174 result[high(result)].AdapterName := trim(tmp);
170- End Else Begin
175+ End
176+ Else Begin
171177 result[high(result)].AdapterName := ' unknown' ;
172178 End ;
173- End Else Begin
179+ End
180+ Else Begin
174181 result[high(result)].AdapterName := ' unknown' ;
175182 End ;
176183 End ;
198205 setlength(result, high(result));
199206 Continue;
200207 End ;
201- End Else Begin
208+ End
209+ Else Begin
202210 setlength(result, high(result));
203211 Continue;
204212 End ;
You can’t perform that action at this time.
0 commit comments