]> pd.if.org Git - pdclib/commitdiff
Prefix / postfix error screwing up any code using ungetc().
authorsolar <unknown>
Tue, 13 Jul 2010 08:12:22 +0000 (08:12 +0000)
committersolar <unknown>
Tue, 13 Jul 2010 08:12:22 +0000 (08:12 +0000)
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++];
 }