aboutsummaryrefslogtreecommitdiff
path: root/src/archive.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2010-05-28 19:23:45 +0000
committerMike Buland <eichlan@xagasoft.com>2010-05-28 19:23:45 +0000
commit674274ed06dfdf9488e7f3bc9e3b45b9f7f4fb18 (patch)
treedf88d2ee7f25614e16ce2df7c07ca191f1745ac8 /src/archive.cpp
parent5b68b0c6abd98fc99acd57a2c5c691468e7dcb97 (diff)
downloadlibbu++-674274ed06dfdf9488e7f3bc9e3b45b9f7f4fb18.tar.gz
libbu++-674274ed06dfdf9488e7f3bc9e3b45b9f7f4fb18.tar.bz2
libbu++-674274ed06dfdf9488e7f3bc9e3b45b9f7f4fb18.tar.xz
libbu++-674274ed06dfdf9488e7f3bc9e3b45b9f7f4fb18.zip
More myriad testing and unit test features, not unit tests that may take a
while are welcome to provide progress info with some builtin functions. The Bu::Archive class now throws an exception if reading is interrupted by EOS
Diffstat (limited to 'src/archive.cpp')
-rw-r--r--src/archive.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/archive.cpp b/src/archive.cpp
index d5f77c5..f29895c 100644
--- a/src/archive.cpp
+++ b/src/archive.cpp
@@ -33,7 +33,8 @@ void Bu::Archive::read( void *pData, int32_t nSize )
33 if( nSize == 0 || pData == NULL ) 33 if( nSize == 0 || pData == NULL )
34 return; 34 return;
35 35
36 rStream.read( (char *)pData, nSize ); 36 if( rStream.read( (char *)pData, nSize ) < nSize )
37 throw Bu::ExceptionBase("Insufficient data to unarchive object.");
37} 38}
38 39
39void Bu::Archive::close() 40void Bu::Archive::close()