From ad212c78d12acc51f98e0238e0870ce98901d9a9 Mon Sep 17 00:00:00 2001 From: Allanis Date: Thu, 23 May 2013 19:50:13 +0100 Subject: [PATCH] [Fix] Killed warnings for base64 --- src/base64.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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) {