From: solar Date: Tue, 13 Jul 2010 08:12:22 +0000 (+0000) Subject: Prefix / postfix error screwing up any code using ungetc(). X-Git-Tag: v0.5~64 X-Git-Url: https://pd.if.org/git/?p=pdclib;a=commitdiff_plain;h=7e1ea4998255982bbf93539e941991bcf40d2813 Prefix / postfix error screwing up any code using ungetc(). --- 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++]; }