From 2d6ca8a7b2e24e1b5670529c220f50ef23f1652e Mon Sep 17 00:00:00 2001 From: Stephen Heumann Date: Sat, 2 Jul 2022 22:09:56 -0500 Subject: [PATCH] Do not set read/write error indicator if ftell cannot get the file mark. This is not really an IO operation on the file, and accordingly the C standards do not describe the error indicator as being set here. In particular, you cannot get the mark for a character device, but that is expected behavior, not really an error condition. errno is still set, indicating that the ftell operation failed. --- stdio.asm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdio.asm b/stdio.asm index 5ba27ad..072b0ea 100644 --- a/stdio.asm +++ b/stdio.asm @@ -2008,8 +2008,8 @@ lb0 ldy #FILE_file get the file's mark sta gmRefNum OSGet_Mark gm bcc lb1 - ph4 errno bra rts lb1 move4 gmPosition,pos set the position