X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2Fstdio%2Ffwrite.c;fp=functions%2Fstdio%2Ffwrite.c;h=90c8f44eb3993307e5f6498da08adba71186824a;hb=7e71d1ccd9d7b1db85ce887ea15cf625025794ef;hp=89e9c03944f1c86a8cc11d2e0431b845d6e707d4;hpb=4709c796aa86ab9dacfa8c63e297482d0489c141;p=pdclib.old diff --git a/functions/stdio/fwrite.c b/functions/stdio/fwrite.c index 89e9c03..90c8f44 100644 --- a/functions/stdio/fwrite.c +++ b/functions/stdio/fwrite.c @@ -44,6 +44,12 @@ size_t fwrite( const void * _PDCLIB_restrict ptr, size_t size, size_t nmemb, str return nmemb_i; } //lineend = false; + /* + * The entire buffer has been flushed; this means we have to + * reset our newline position as we have already written + * that part of the stream. + */ + offset = 0; } } }