mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-09 15:29:16 +02:00
Avoid range check error on win64 target in comparison of THandle to -1
git-svn-id: trunk@34147 -
This commit is contained in:
parent
83538a3ceb
commit
d1a610a2fc
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user