Playing games with chars is always a bad idea, but this time for sure!
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
int8_t ret;
ret = maps->decode_map[(unsigned char)b64letter];
- if (ret == '\xff') {
+ if (ret == (int8_t)'\xff') {
errno = EDOM;
return -1;
}
bool base64_char_in_alphabet(const base64_maps_t *maps, const char b64char)
{
- return (maps->decode_map[(const unsigned char)b64char] != '\xff');
+ return (maps->decode_map[(const unsigned char)b64char] != (signed char)'\xff');
}
void base64_init_maps(base64_maps_t *dest, const char src[64])