From 7e1ea4998255982bbf93539e941991bcf40d2813 Mon Sep 17 00:00:00 2001 From: solar Date: Tue, 13 Jul 2010 08:12:22 +0000 Subject: [PATCH] Prefix / postfix error screwing up any code using ungetc(). --- functions/stdio/fgetc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/stdio/fgetc.c b/functions/stdio/fgetc.c index 1a90eb9..5837a74 100644 --- a/functions/stdio/fgetc.c +++ b/functions/stdio/fgetc.c @@ -20,7 +20,7 @@ int fgetc( struct _PDCLIB_file_t * stream ) } if ( stream->ungetidx > 0 ) { - return stream->ungetbuf[ stream->ungetidx-- ]; + return stream->ungetbuf[ --(stream->ungetidx) ]; } return stream->buffer[stream->bufidx++]; } -- 2.40.0