From: beware Date: Fri, 7 Apr 2017 02:29:15 +0000 (+0000) Subject: zipplet: fix range check exception in fpc 3 on tcp connect X-Git-Url: http://www.lcore.org/git/lcore.git/commitdiff_plain/21410d99e1361e5474a47bb0bd0bc6e939f91b7d zipplet: fix range check exception in fpc 3 on tcp connect git-svn-id: file:///svnroot/lcore/trunk@148 b1de8a11-f9be-4011-bde0-cc7ace90066a --- diff --git a/binipstuff.pas b/binipstuff.pas index e7d891c..1d7a7c2 100644 --- a/binipstuff.pas +++ b/binipstuff.pas @@ -300,7 +300,10 @@ begin {$endif} {try v4} - binip.ip := htonl(longip(s)); + // zipplet: htonl() expects a uint32 but longip() spits out longint. + // Because longip() is deprecated, we do not fix it but typecast. + //binip.ip := htonl(longip(s)); + binip.ip := htonl(uint32(longip(s))); if (binip.ip <> 0) or (s = '0.0.0.0') then begin result := true; binip.family := AF_INET;