From 7aaa90c33101a729e7ef3b888562f8dcbe68372d Mon Sep 17 00:00:00 2001 From: lloyd Date: Fri, 3 Jun 2011 14:18:14 +0000 Subject: Ignore \r as whitespace in base64 decoder - caused test failures on Windows :( --- src/codec/base64/base64.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/codec/base64/base64.cpp') 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 '") + -- cgit v1.2.3