From a5504be621e12d58b1d14aa5698432c65367ac2d Mon Sep 17 00:00:00 2001 From: Stephen Heumann Date: Sun, 11 Jun 2023 16:07:19 -0500 Subject: [PATCH] scanf: skip remaining directives after encountering EOF. Encountering EOF is an input failure, which terminates scanf processing. Thus, remaining directives (even %n) should not be processed. --- stdio.asm | 1 + 1 file changed, 1 insertion(+) diff --git a/stdio.asm b/stdio.asm index 1f4bdd0..1ecfa4a 100644 --- a/stdio.asm +++ b/stdio.asm @@ -6153,6 +6153,7 @@ ps stz ~assignments no assignments yet stz ~eofFound eof was not the first char ps1 lda ~scanError quit if a scan error has occurred + ora ~eofFound bne rm1 lda [format] get a character and #$00FF