From 21410d99e1361e5474a47bb0bd0bc6e939f91b7d Mon Sep 17 00:00:00 2001 From: beware Date: Fri, 7 Apr 2017 02:29:15 +0000 Subject: [PATCH] zipplet: fix range check exception in fpc 3 on tcp connect git-svn-id: file:///svnroot/lcore/trunk@148 b1de8a11-f9be-4011-bde0-cc7ace90066a --- binipstuff.pas | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; -- 2.30.2