diff options
author | Mike Buland <eichlan@xagasoft.com> | 2010-09-14 07:10:06 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2010-09-14 07:10:06 +0000 |
commit | d210c301bc3e8867cad883e80663208474cc1ea5 (patch) | |
tree | cf79adc2952c20dfc5c8c051b3a0d907c4f7d9c7 /src/archive.cpp | |
parent | 29ab73673e547abd20fc1a98e6ae642b11952808 (diff) | |
download | libbu++-d210c301bc3e8867cad883e80663208474cc1ea5.tar.gz libbu++-d210c301bc3e8867cad883e80663208474cc1ea5.tar.bz2 libbu++-d210c301bc3e8867cad883e80663208474cc1ea5.tar.xz libbu++-d210c301bc3e8867cad883e80663208474cc1ea5.zip |
Quite exciting, really. That lurking myriad bug has been found, it was not
forcing a header update when a stream changed size, but did not require
additional blocks to be linked in. Kind of strange, but it's fixed now.
A little more testing and I think it'll be ready.
Diffstat (limited to '')
-rw-r--r-- | src/archive.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/archive.cpp b/src/archive.cpp index f29895c..69d4a0c 100644 --- a/src/archive.cpp +++ b/src/archive.cpp | |||
@@ -9,6 +9,8 @@ | |||
9 | #include "bu/stream.h" | 9 | #include "bu/stream.h" |
10 | #include "bu/archival.h" | 10 | #include "bu/archival.h" |
11 | 11 | ||
12 | #include "bu/sio.h" | ||
13 | |||
12 | Bu::Archive::Archive( Stream &rStream, bool bLoading ) : | 14 | Bu::Archive::Archive( Stream &rStream, bool bLoading ) : |
13 | bLoading( bLoading ), | 15 | bLoading( bLoading ), |
14 | rStream( rStream ), | 16 | rStream( rStream ), |
@@ -24,8 +26,13 @@ void Bu::Archive::write( const void *pData, int32_t nSize ) | |||
24 | { | 26 | { |
25 | if( nSize == 0 || pData == NULL ) | 27 | if( nSize == 0 || pData == NULL ) |
26 | return; | 28 | return; |
27 | 29 | ||
30 | // Bu::sio << "Writing starting at pos: " << rStream.tell() << " - " | ||
31 | // << Bu::sio.flush; | ||
32 | |||
28 | rStream.write( (const char *)pData, nSize ); | 33 | rStream.write( (const char *)pData, nSize ); |
34 | // | ||
35 | // Bu::sio << rStream.tell() << " (" << nSize << "b)" << Bu::sio.nl; | ||
29 | } | 36 | } |
30 | 37 | ||
31 | void Bu::Archive::read( void *pData, int32_t nSize ) | 38 | void Bu::Archive::read( void *pData, int32_t nSize ) |