X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2Fstdio%2Ffopen.c;h=4a74e1776ddcc74973e2fb4981d555c19cbd4fa8;hb=22b64ead4cdb08b34e3db82fa1fb1c6095f6b0e9;hp=9a01fe3debc8f225a5bdd1244ba85814355589f1;hpb=789218b93f437f45f094de13584c7bb20fdf5628;p=pdclib.old diff --git a/functions/stdio/fopen.c b/functions/stdio/fopen.c index 9a01fe3..4a74e17 100644 --- a/functions/stdio/fopen.c +++ b/functions/stdio/fopen.c @@ -82,6 +82,7 @@ struct _PDCLIB_file_t * fopen( const char * _PDCLIB_restrict filename, const cha _PDCLIB_filelist = rc; /* Setting buffer, and mark as internal. TODO: Check for unbuffered? */ if ( ( rc->buffer = malloc( BUFSIZ ) ) == NULL ) goto fail; + rc->bufsize = BUFSIZ; rc->status |= ( _PDCLIB_LIBBUFFER | _PDCLIB_VIRGINSTR ); /* TODO: Setting mbstate */ return rc;