From d53a344e183977eecb1c9a9e6ce278684ce8d336 Mon Sep 17 00:00:00 2001 From: Justine Tunney Date: Tue, 2 Mar 2021 07:34:38 -0800 Subject: [PATCH] Remove getc() optimization This has been reported as causing issues in #61 although it isn't clear why that's happening. Having a function boundary is bullet proof. --- libc/stdio/stdio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libc/stdio/stdio.h b/libc/stdio/stdio.h index 8f49fddfc..dce7bd78f 100644 --- a/libc/stdio/stdio.h +++ b/libc/stdio/stdio.h @@ -100,7 +100,7 @@ int vfscanf(FILE *, const char *, va_list); │ cosmopolitan § standard i/o » optimizations ─╬─│┼ ╚────────────────────────────────────────────────────────────────────────────│*/ -#define getc(f) (f->beg < f->end ? f->buf[f->beg++] : fgetc(f)) +#define getc(f) fgetc(f) #define putc(c, f) fputc(c, f) #if defined(__GNUC__) && !defined(__STRICT_ANSI__)