Skip to content

Commit 8402dba

Browse files
committed
Util (Base64): silence compiler warnings
1 parent 94b6f0f commit 8402dba

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/util/base64.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ void ffBase64EncodeRaw(uint32_t size, const char *str, uint32_t *out_size, char
3737
*out_size = (uint32_t)(out - output);
3838
}
3939

40-
static char decode_table[256];
40+
static uint8_t decode_table[256];
4141

4242
void init_decode_table()
4343
{
@@ -59,10 +59,7 @@ void init_decode_table()
5959
} while (ch++ < 0xFF);
6060
}
6161

62-
#define next_char(x) \
63-
char x = decode_table[(unsigned char)*str++]; \
64-
if (x < 0) \
65-
return false;
62+
#define next_char(x) uint8_t x = decode_table[(uint8_t) *str++];
6663

6764
bool ffBase64DecodeRaw(uint32_t size, const char *str, uint32_t *out_size, char *output)
6865
{

0 commit comments

Comments
 (0)