X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=functions%2Fstdio%2Ffopen.c;h=4a74e1776ddcc74973e2fb4981d555c19cbd4fa8;hp=9a01fe3debc8f225a5bdd1244ba85814355589f1;hb=3437cc901226c8af121a5a126ee6d5295dc835c7;hpb=f0ac10970fd7b6bca57495e1aa41517c1e673110 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;