diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Base85.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Base85.cc b/lib/Base85.cc index d1f4baa..0117e5e 100644 --- a/lib/Base85.cc +++ b/lib/Base85.cc @@ -20,6 +20,7 @@ #include <Base85.h> // Banned chars: ",/:.[\] +// EOF marker: ~ static char cb85[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!#$%&'()*+-;<=>?@^_`{|}"; static char lookup[] = { // x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 xA xB xC xD xE xF @@ -97,9 +98,9 @@ int Base85::decode_block(char s1, char s2, char s3, char s4, char s5, unsigned c unsigned int tuple; len = s3 == '~' ? 1 : s4 == '~' ? 2 : s5 == '~' ? 3 : 4; - s3 = (s3 == '~') || (s3 == 0) ? '!' : s3; - s4 = (s4 == '~') || (s4 == 0) ? '!' : s4; - s5 = (s5 == '~') || (s5 == 0) ? '!' : s5; + s3 = (s3 == '~') || (s3 == 0) ? 0 : s3; + s4 = (s4 == '~') || (s4 == 0) ? 0 : s4; + s5 = (s5 == '~') || (s5 == 0) ? 0 : s5; sb1 = lookup[s1]; sb2 = lookup[s2]; |