X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=platform%2Fwin32%2Ffunctions%2F_PDCLIB%2F_PDCLIB_flushbuffer.c;h=c0ade01ec18251948f3ef60323f91745b2490f8c;hb=9fefb489743f1b6c512ba93555dc20627afec3f0;hp=82e36a0217b11190e02158a0af8d3338baf3dd3c;hpb=d8928b5f31bbdac23f9ec296ef28b4b10efa31d5;p=pdclib diff --git a/platform/win32/functions/_PDCLIB/_PDCLIB_flushbuffer.c b/platform/win32/functions/_PDCLIB/_PDCLIB_flushbuffer.c index 82e36a0..c0ade01 100644 --- a/platform/win32/functions/_PDCLIB/_PDCLIB_flushbuffer.c +++ b/platform/win32/functions/_PDCLIB/_PDCLIB_flushbuffer.c @@ -17,6 +17,8 @@ #include #include +void _PDCLIB_w32errno( void ); + int _PDCLIB_flushbuffer( struct _PDCLIB_file_t * stream ) { if ( ! ( stream->status & _PDCLIB_FBIN ) ) @@ -33,6 +35,7 @@ int _PDCLIB_flushbuffer( struct _PDCLIB_file_t * stream ) BOOL res = WriteFile( stream->handle, stream->buffer + written, toWrite, &justWrote, NULL); written += justWrote; + stream->pos.offset += justWrote; if(!res) { stream->status |=_PDCLIB_ERRORFLAG;