diff options
author | Mike Buland <eichlan@xagasoft.com> | 2006-07-02 09:39:15 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2006-07-02 09:39:15 +0000 |
commit | ffbc905bae8c3bdbdf215e4a0bf2356d8d25027a (patch) | |
tree | da8614e5a13c547f4f51158808d3e3f0d5da3c74 | |
parent | 264f825549ecd23046ad049733870d0516d59e89 (diff) | |
download | libbu++-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.
-rw-r--r-- | src/serializerbzip2.cpp | 5 |
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 | { |