X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libsrc%2Fcommon%2Fungetc.s;h=386c450a8ee1dbbb4c52ec7be9086bc912113226;hb=f16516047a551319c82debd339ded8bc2b587212;hp=590d2d671a3c3584b9aa83af77b86ef0f82199c1;hpb=dc16edb6b22397529733fdc22e90959b7c61a6cd;p=cc65 diff --git a/libsrc/common/ungetc.s b/libsrc/common/ungetc.s index 590d2d671..386c450a8 100644 --- a/libsrc/common/ungetc.s +++ b/libsrc/common/ungetc.s @@ -31,15 +31,15 @@ ; c must be in char range - tax + txa bne error ; Check if the file is open - ldy #_FILE::f_flags - lda (ptr1),y - and #_FOPEN ; Is the file open? - beq error ; Branch if no + ldy #_FILE::f_flags + lda (ptr1),y + and #_FOPEN ; Is the file open? + beq error ; Branch if no ; Set the pushback flag and reset the end-of-file indicator @@ -68,4 +68,4 @@ error: lda #EINVAL rts .endproc - +