X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=platform%2Fwin32%2Ffunctions%2F_PDCLIB%2F_PDCLIB_flushbuffer.c;h=c0ade01ec18251948f3ef60323f91745b2490f8c;hb=6857a8b6a37012230a5446e8857ab019644c66f3;hp=82e36a0217b11190e02158a0af8d3338baf3dd3c;hpb=950d2e48042173a75188b0a2dbe219ed91ff47cf;p=pdclib.old 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;