Clear the EOF flag on successful calls to ungetc().

This is specified by the C standards.
This commit is contained in:
Stephen Heumann 2022-06-27 17:59:21 -05:00
parent 38666ee111
commit 1f88a38e2e
1 changed files with 5 additions and 2 deletions

View File

@ -3194,8 +3194,11 @@ char equ 1 character to return
and #$00FF
sta [stream],Y
sta char
rts long M
creturn 2:char
ldy #FILE_flag clear the EOF flag
lda [stream],Y
and #$FFFF-_IOEOF
sta [stream],Y
rts creturn 2:char
end
****************************************************************