fixing 1666

This commit is contained in:
Christian Grothoff committed 2011-03-03 20:45:20 +00:00
1 parent 9006e7df90
commit 8a5cf8f14f
2 files changed
+6 -2

No files matched your search

+4
View File
@@ -1,3 +1,7 @@
Thu Mar 3 21:42:47 CET 2011
Fixing issue where Base64 decode fails when char is defined
as unsigned char (Mantis 1666). -CG/tmayer
Tue Mar 1 13:58:04 CET 2011
Allow use of 'poll' in combination with the external select mode.
Avoid using pthread signals (SIGALRM), use pipe instead.
+2 -2
View File
@@ -46,10 +46,10 @@ char* BASE64Decode(const char* src) {
char c = base64_digits[(unsigned char)*(src++)];
char d = base64_digits[(unsigned char)*(src++)];
*(dest++) = (a << 2) | ((b & 0x30) >> 4);
if (c == -1)
if (c == (char)-1)
break;
*(dest++) = ((b & 0x0f) << 4) | ((c & 0x3c) >> 2);
if (d == -1)
if (d == (char)-1)
break;
*(dest++) = ((c & 0x03) << 6) | d;
}