Avoid range check error on win64 target in comparison of THandle to -1

git-svn-id: trunk@34147 -
This commit is contained in:
pierre 2016-07-19 09:48:34 +00:00
parent 83538a3ceb
commit d1a610a2fc

View File

@ -36,7 +36,7 @@ begin
if r=u then
begin
f:=FileCreate(u,fmShareDenyNone,(6 shl 6) or (4 shl 3) or 4);
if f=-1 then
if f=THandle(-1) then
Error('Creating utf8string');
FileClose(f);
DeleteFile(u);
@ -50,7 +50,7 @@ begin
if r=c then
begin
f:=FileCreate(c,fmShareDenyNone,(6 shl 6) or (4 shl 3) or 4);
if f=-1 then
if f=THandle(-1) then
Error('Creating tcpstr866');
FileClose(f);
DeleteFile(c);
@ -71,7 +71,7 @@ begin
if r=u then
begin
f:=FileCreate(u,fmShareDenyNone,(6 shl 6) or (4 shl 3) or 4);
if f=-1 then
if f=THandle(-1) then
Error('Creating unicodestring 1');
FileClose(f);
DeleteFile(u);
@ -83,7 +83,7 @@ begin
if r=u then
begin
f:=FileCreate(u,fmShareDenyNone,(6 shl 6) or (4 shl 3) or 4);
if f=-1 then
if f=THandle(-1) then
Error('Creating unicodestring 2');
FileClose(f);
DeleteFile(u);
@ -96,4 +96,4 @@ end;
begin
testsinglebyte;
testtwobyte;
end.
end.