aboutsummaryrefslogtreecommitdiff
path: root/src/serializerbzip2.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2006-07-02 09:39:15 +0000
committerMike Buland <eichlan@xagasoft.com>2006-07-02 09:39:15 +0000
commitffbc905bae8c3bdbdf215e4a0bf2356d8d25027a (patch)
treeda8614e5a13c547f4f51158808d3e3f0d5da3c74 /src/serializerbzip2.cpp
parent264f825549ecd23046ad049733870d0516d59e89 (diff)
downloadlibbu++-ffbc905bae8c3bdbdf215e4a0bf2356d8d25027a.tar.gz
libbu++-ffbc905bae8c3bdbdf215e4a0bf2356d8d25027a.tar.bz2
libbu++-ffbc905bae8c3bdbdf215e4a0bf2356d8d25027a.tar.xz
libbu++-ffbc905bae8c3bdbdf215e4a0bf2356d8d25027a.zip
Fixed a bug that caused the stream to be placed at a random location after the
serializer was closed. Everything works as expected now.
Diffstat (limited to 'src/serializerbzip2.cpp')
-rw-r--r--src/serializerbzip2.cpp5
1 files changed, 5 insertions, 0 deletions
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()
53 { 53 {
54 if( isLoading() ) 54 if( isLoading() )
55 { 55 {
56 void *unused;
57 int nUnused;
58 BZ2_bzReadGetUnused( &bzerror, bzFile, &unused, &nUnused );
56 BZ2_bzReadClose( &bzerror, bzFile ); 59 BZ2_bzReadClose( &bzerror, bzFile );
60 if( nUnused )
61 fseek( fhFile, -nUnused, SEEK_CUR );
57 } 62 }
58 else 63 else
59 { 64 {