forked from Mirrorlandia_minetest/minetest
decode_base64: Allow '=' padding character
'=' is a valid character, but minetest.decode_base64 returned nil when it was used for padding.
This commit is contained in:
parent
3ce03d1c2a
commit
f34abaedd2
@ -34,8 +34,9 @@ static const std::string base64_chars =
|
|||||||
"0123456789+/";
|
"0123456789+/";
|
||||||
|
|
||||||
|
|
||||||
static inline bool is_base64(unsigned char c) {
|
static inline bool is_base64(unsigned char c)
|
||||||
return (isalnum(c) || (c == '+') || (c == '/'));
|
{
|
||||||
|
return isalnum(c) || c == '+' || c == '/' || c == '=';
|
||||||
}
|
}
|
||||||
|
|
||||||
bool base64_is_valid(std::string const& s)
|
bool base64_is_valid(std::string const& s)
|
||||||
|
Loading…
Reference in New Issue
Block a user