X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2Fstdio%2Ffwrite.c;h=90c8f44eb3993307e5f6498da08adba71186824a;hb=dce83cc9963794572709bbc3c95a462c33be18c1;hp=89e9c03944f1c86a8cc11d2e0431b845d6e707d4;hpb=b41576197133c1211d6ec353faf93f505f573b8a;p=pdclib 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; } } }