From ffbc905bae8c3bdbdf215e4a0bf2356d8d25027a Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Sun, 2 Jul 2006 09:39:15 +0000 Subject: Fixed a bug that caused the stream to be placed at a random location after the serializer was closed. Everything works as expected now. --- src/serializerbzip2.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/serializerbzip2.cpp b/src/serializerbzip2.cpp index b899384..9d4dafa 100644 --- a/src/serializerbzip2.cpp +++ b/src/serializerbzip2.cpp @@ -53,7 +53,12 @@ void SerializerBZip2::close() { if( isLoading() ) { + void *unused; + int nUnused; + BZ2_bzReadGetUnused( &bzerror, bzFile, &unused, &nUnused ); BZ2_bzReadClose( &bzerror, bzFile ); + if( nUnused ) + fseek( fhFile, -nUnused, SEEK_CUR ); } else { -- cgit v1.2.3