Skip to content
Browse files

make the base64 implementation work on ARM

char is unsigned by default on ARM, leading to problems, see:
http://sourceforge.net/tracker/?func=detail&aid=3313901&group_id=152942&atid=785907

Thanks to user "yann" on Yubico forums for noticing this bug.
  • Loading branch information...
1 parent fe8b9c2 commit 6fcc3d49d1d9b733c5bd04e4e60d400ed97cda40 @klali klali committed Aug 6, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 b64/cdecode.c
  2. +1 −1 b64/cencode.c
View
2 b64/cdecode.c
@@ -26,7 +26,7 @@ int base64_decode_block(const char* code_in, const int length_in, char* plaintex
{
const char* codechar = code_in;
char* plainchar = plaintext_out;
- char fragment;
+ signed char fragment;
*plainchar = state_in->plainchar;
View
2 b64/cencode.c
@@ -29,7 +29,7 @@ int base64_encode_block(const char* plaintext_in, int length_in, char* code_out,
const char* const plaintextend = plaintext_in + length_in;
char* codechar = code_out;
char result;
- char fragment;
+ signed char fragment;
result = state_in->result;

0 comments on commit 6fcc3d4

Please sign in to comment.
Something went wrong with that request. Please try again.