From 12e3e5cc742f090e655616532db5fd8bed8db838 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 28 Aug 2000 22:29:36 +0000 Subject: [PATCH] (ungetc): Cast c to signed char first to really match EOF. --- stdio-common/vfscanf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdio-common/vfscanf.c b/stdio-common/vfscanf.c index 1d9fd3e..93e015f 100644 --- a/stdio-common/vfscanf.c +++ b/stdio-common/vfscanf.c @@ -102,7 +102,7 @@ # undef EOF # define EOF WEOF # else -# define ungetc(c, s) ((void) ((int) c == EOF \ +# define ungetc(c, s) ((void) ((int) (signed char) c == EOF \ || (--read_in, \ _IO_sputbackc (s, (unsigned char) c)))) # define inchar() (c == EOF ? EOF \ -- 2.7.4