From 8105e8615556d0d325aeee8fa84a88ef796c9b29 Mon Sep 17 00:00:00 2001 From: Meep-Eep Date: Thu, 11 Jan 2007 22:04:14 +0000 Subject: [PATCH] Flush the stream when doing a uio_close() after a uio_fwrite(). git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2655 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/ChangeLog | 1 + sc2/src/sc2code/libs/uio/uiostream.c | 1 + 2 files changed, 2 insertions(+) diff --git a/sc2/ChangeLog b/sc2/ChangeLog index 2e3dda957..94b8eeae1 100644 --- a/sc2/ChangeLog +++ b/sc2/ChangeLog @@ -1,4 +1,5 @@ Changes towards version 0.7: +- Flush write buffer when doing a uio_close() after a uio_fwrite() - SvdB - Major rewrite of the SwapBuffers commands -- screen compositing logic has all been abstracted out into sdl_common.c instead of being nearly-duplicated in opengl.c and pure.c - Michael diff --git a/sc2/src/sc2code/libs/uio/uiostream.c b/sc2/src/sc2code/libs/uio/uiostream.c index 77842bfd3..f1b9852c5 100644 --- a/sc2/src/sc2code/libs/uio/uiostream.c +++ b/sc2/src/sc2code/libs/uio/uiostream.c @@ -356,6 +356,7 @@ uio_fwrite(const void *buf, size_t size, size_t nmemb, uio_Stream *stream) { ssize_t bytesWritten; uio_assertWriteSanity(stream); + stream->operation = uio_StreamOperation_write; // NB. If a file is opened in append mode, the file position indicator // is moved to the end of the file before writing.