Antoine Kaufmann ·
! Pascal-RTL: fopen gibt im Fehlerfall nicht -1 zurueck Signed-off-by: Antoine Kaufmann <toni at tyndur.org> --- src/modules/pas/lib/rtl/sysfile.inc | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/modules/pas/lib/rtl/sysfile.inc b/src/modules/pas/lib/rtl/sysfile.inc index 7546c97..e357f62 100644 --- a/src/modules/pas/lib/rtl/sysfile.inc +++ b/src/modules/pas/lib/rtl/sysfile.inc @@ -120,7 +120,7 @@ begin end; frec^.handle := c_fopen(name, @c_mode[1]); - if frec^.handle < 0 then begin + if frec^.handle = 0 then begin InOutRes := 2; end else begin c_setvbuf(frec^.handle, nil, 1, 0); -- 1.6.0.6