diff --git a/src/base64.c b/src/base64.c index 5778a3e..86ef816 100644 --- a/src/base64.c +++ b/src/base64.c @@ -3,8 +3,7 @@ #include // Encode table. -static const char cb64[64] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstu \ - vwxyz0123456789+/"; +static const char cb64[64] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; // Decode table. #define B64(_) \ ((_) == 'A' ? 0 \ @@ -189,13 +188,13 @@ char* base64_encode(size_t* len, char* src, size_t sz) { // Decode the buffer, same syntax as base64_encode. inline int dec_valid(char inp) { - if(cd64[inp] == -1) + if(cd64[(int)inp] == -1) return 0; return 1; } inline char dec_ch(char inp) { - return cd64[inp]; + return cd64[(int)inp]; } char* base64_decode(size_t* len, char* src, size_t sz) {