X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2Fstdio%2Ffgetc.c;fp=functions%2Fstdio%2Ffgetc.c;h=b5a32572158fd89dc2875d65dfca75407073d231;hb=f91c757a54bdfb3d0ee43e5352973b9f940f0a71;hp=5837a74178f596362053de7dfadff5e924baa960;hpb=00379f785fe102b41c75761d4c1f2a1dbb8d1fde;p=pdclib diff --git a/functions/stdio/fgetc.c b/functions/stdio/fgetc.c index 5837a74..b5a3257 100644 --- a/functions/stdio/fgetc.c +++ b/functions/stdio/fgetc.c @@ -20,9 +20,9 @@ int fgetc( struct _PDCLIB_file_t * stream ) } if ( stream->ungetidx > 0 ) { - return stream->ungetbuf[ --(stream->ungetidx) ]; + return (unsigned char)stream->ungetbuf[ --(stream->ungetidx) ]; } - return stream->buffer[stream->bufidx++]; + return (unsigned char)stream->buffer[stream->bufidx++]; } #endif