diff options
author | lloyd <[email protected]> | 2011-06-03 14:18:14 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2011-06-03 14:18:14 +0000 |
commit | 7aaa90c33101a729e7ef3b888562f8dcbe68372d (patch) | |
tree | 5bd1832caa7f0c69a83ee8770116b9c36161ade5 | |
parent | ef1e4c225f8741bec302ab8cea94a3de5a93ce0b (diff) |
Ignore \r as whitespace in base64 decoder - caused test failures on
Windows :(
-rw-r--r-- | src/codec/base64/base64.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/codec/base64/base64.cpp b/src/codec/base64/base64.cpp index 4e3a84dc7..6a53a7a9a 100644 --- a/src/codec/base64/base64.cpp +++ b/src/codec/base64/base64.cpp @@ -110,7 +110,7 @@ size_t base64_decode(byte output[], */ static const byte BASE64_TO_BIN[256] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x80, - 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0x80, 0xFF, 0xFF, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3E, 0xFF, 0xFF, 0xFF, 0x3F, 0x34, 0x35, @@ -159,6 +159,8 @@ size_t base64_decode(byte output[], bad_char = "\\t"; else if(bad_char == "\n") bad_char = "\\n"; + else if(bad_char == "\r") + bad_char = "\\r"; throw std::invalid_argument( std::string("base64_decode: invalid base64 character '") + |