mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-11 02:30:53 +02:00
Avoid range check error for functions returning THandle type by using unusedhandle system constant
git-svn-id: trunk@42742 -
This commit is contained in:
parent
8fd0a27875
commit
6f2b027e51
@ -135,7 +135,7 @@ var
|
||||
Begin
|
||||
e := OpenFile(FileName, result, Mode, faOpen);
|
||||
if e <> 0 then
|
||||
result := -1;
|
||||
result := unusedhandle;
|
||||
end;
|
||||
|
||||
|
||||
@ -145,7 +145,7 @@ var
|
||||
begin
|
||||
e := OpenFile(FileName, result, ofReadWrite, faCreate or faOpenReplace);
|
||||
if e <> 0 then
|
||||
result := -1;
|
||||
result := unusedhandle;
|
||||
end;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user