[Fix] Killed warnings for base64
This commit is contained in:
parent
7cf183ea88
commit
ad212c78d1
@ -3,8 +3,7 @@
|
||||
#include <stdint.h>
|
||||
|
||||
// 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) {
|
||||
|
Loading…
Reference in New Issue
Block a user