From: solar Date: Tue, 13 Jul 2010 08:12:22 +0000 (+0000) Subject: Prefix / postfix error screwing up any code using ungetc(). X-Git-Url: https://git.gag.com/?p=fw%2Fpdclib;a=commitdiff_plain;h=c1775926934555df4b344dbb822e6dbccf81cd10 Prefix / postfix error screwing up any code using ungetc(). git-svn-id: https://srv7.svn-repos.de/dev34/pdclib/trunk@437 546481bc-9713-0410-bf18-d3337bbf4a3e --- 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++]; }