Prefix / postfix error screwing up any code using ungetc().
authorsolar <solar@546481bc-9713-0410-bf18-d3337bbf4a3e>
Tue, 13 Jul 2010 08:12:22 +0000 (08:12 +0000)
committersolar <solar@546481bc-9713-0410-bf18-d3337bbf4a3e>
Tue, 13 Jul 2010 08:12:22 +0000 (08:12 +0000)
git-svn-id: https://srv7.svn-repos.de/dev34/pdclib/trunk@437 546481bc-9713-0410-bf18-d3337bbf4a3e

functions/stdio/fgetc.c

index 1a90eb95dadea9780b28a024c6fb94c9bad99570..5837a74178f596362053de7dfadff5e924baa960 100644 (file)
@@ -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++];
 }