diff options
author | Mike Buland <eichlan@xagasoft.com> | 2009-08-03 21:33:33 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2009-08-03 21:33:33 +0000 |
commit | 6e6402825bcd6021d62fd2eb8a0669641fe9c266 (patch) | |
tree | 6942e99b440849046482e99eef7590014c06120d /src/base64.cpp | |
parent | fbb30d35cfa10bf36d4ecb2d0eb5971c24aab26a (diff) | |
download | libbu++-6e6402825bcd6021d62fd2eb8a0669641fe9c266.tar.gz libbu++-6e6402825bcd6021d62fd2eb8a0669641fe9c266.tar.bz2 libbu++-6e6402825bcd6021d62fd2eb8a0669641fe9c266.tar.xz libbu++-6e6402825bcd6021d62fd2eb8a0669641fe9c266.zip |
Hey, buffer has some good tweaks, added some stuff and fixed stuff in formatter
and base64 no longer accidentally complains about properly formatted streams,
as much...
Diffstat (limited to '')
-rw-r--r-- | src/base64.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/base64.cpp b/src/base64.cpp index ccf9077..55df550 100644 --- a/src/base64.cpp +++ b/src/base64.cpp | |||
@@ -118,9 +118,14 @@ size_t Bu::Base64::read( void *pBuf, size_t nBytes ) | |||
118 | { | 118 | { |
119 | if( rNext.isEos() ) | 119 | if( rNext.isEos() ) |
120 | { | 120 | { |
121 | iChars = 0; | ||
122 | bEosIn = true; | 121 | bEosIn = true; |
123 | throw Base64Exception("Premature end of stream detected while decoding Base64 data."); | 122 | if( j != 0 ) |
123 | { | ||
124 | throw Base64Exception( | ||
125 | "Premature end of stream detected while " | ||
126 | "decoding Base64 data." | ||
127 | ); | ||
128 | } | ||
124 | } | 129 | } |
125 | return sIn; | 130 | return sIn; |
126 | } | 131 | } |