Finally got rid of the stupid char-as-index problem.

pull/30/head
Sprite_tm 10 years ago
parent 876a68a67d
commit 942624e363
  1. 2
      user/base64.c

@ -50,7 +50,7 @@ int ICACHE_FLASH_ATTR base64_decode(size_t in_len, const char *in, size_t out_le
for(io=0,ii=0,v=0,rem=0;ii<in_len;ii++) { for(io=0,ii=0,v=0,rem=0;ii<in_len;ii++) {
unsigned char ch; unsigned char ch;
if(isspace(in[ii])) continue; if(isspace((int)in[ii])) continue;
if(in[ii]=='=') break; /* stop at = */ if(in[ii]=='=') break; /* stop at = */
ch=base64dec_tab[(unsigned int)in[ii]]; ch=base64dec_tab[(unsigned int)in[ii]];
if(ch==255) break; /* stop at a parse error */ if(ch==255) break; /* stop at a parse error */

Loading…
Cancel
Save