Merge pull request #112 from mrdomino/fix-base64

Remove vacuous states in base64_sem?.c
This commit is contained in:
Meredith L. Patterson 2014-12-07 22:21:04 +01:00
commit 47f34b81e4
2 changed files with 4 additions and 4 deletions

View file

@ -29,9 +29,9 @@ HParsedToken *act_bsfdig(const HParseResult *p, void* user_data)
uint8_t c = H_CAST_UINT(p->ast);
if(c >= 0x40 && c <= 0x5A) // A-Z
if(c >= 0x41 && c <= 0x5A) // A-Z
res->uint = c - 0x41;
else if(c >= 0x60 && c <= 0x7A) // a-z
else if(c >= 0x61 && c <= 0x7A) // a-z
res->uint = c - 0x61 + 26;
else if(c >= 0x30 && c <= 0x39) // 0-9
res->uint = c - 0x30 + 52;

View file

@ -31,9 +31,9 @@ uint8_t bsfdig_value(const HParsedToken *p)
if(p && p->token_type == TT_UINT) {
uint8_t c = p->uint;
if(c >= 0x40 && c <= 0x5A) // A-Z
if(c >= 0x41 && c <= 0x5A) // A-Z
value = c - 0x41;
else if(c >= 0x60 && c <= 0x7A) // a-z
else if(c >= 0x61 && c <= 0x7A) // a-z
value = c - 0x61 + 26;
else if(c >= 0x30 && c <= 0x39) // 0-9
value = c - 0x30 + 52;