Merge branch 'base64' into master

This commit is contained in:
Daniel Eklöf 2020-08-08 09:23:17 +02:00
commit 6680f9541f
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -37,12 +37,9 @@ static const char lookup[64] = {
};
static inline bool
is_valid(char c)
is_valid(unsigned char c)
{
return ((c >= 'A' && c <= 'Z') ||
(c >= 'a' && c <= 'z') ||
(c >= '0' && c <= '9') ||
c == '+' || c == '/' || c == '=');
return reverse_lookup[c] != 0 || c == 'A' || c == '=';
}
char *